Skip to content

Commit

Permalink
[ssusysinfo] Expect SSU configuration version 13. Fixes JB#47284
Browse files Browse the repository at this point in the history
Converting existing old ssu data to version 13 adds "brand=Jolla".
This does not warrant changes to ssu-sysinfo.

Update expected ssu configuration version to 13.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Sep 12, 2019
1 parent f77bcf3 commit f58fd0a
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions lib/ssusysinfo.c
Expand Up @@ -36,6 +36,22 @@
#include <time.h>
#include <endian.h>

/* ========================================================================= *
* CONSTANTS
* ========================================================================= */

/** SSU Configuration version ssu-sysinfo is known to be compatible with
*
* SSU configuration version change involves automated edits to data
* already present on devices in active use.
*
* Assumption is that version upgrades are going to be mostly harmless
* from ssu-sysinfo point of view, but when a version bump is detected
* a warning is emitted to journal to prompt manual check & bringing
* ssu-sysinfo back in sync with ssu.
*/
#define EXPECTED_SSU_CONFIG_VERSION 13

/* ========================================================================= *
* TYPES
* ========================================================================= */
Expand Down Expand Up @@ -544,12 +560,7 @@ ssusysinfo_load_ssu_config(ssusysinfo_t *self)
{
inifile_load(self->ssu_ini, "/etc/ssu/ssu.ini", 0);

/* Assumption: SSU itself will migrate configuration
* data to up-to-date version, and we just
* need to check that we stay in sync with
* what ssu considers the latest.
*/
int version_want = 12;
int version_want = EXPECTED_SSU_CONFIG_VERSION;
int version_have = ssusysinfo_ssu_config_version(self);
if( version_have != version_want ) {
log_warning("expected ssu config version %d, found %d",
Expand Down

0 comments on commit f58fd0a

Please sign in to comment.