diff --git a/debian/changelog b/debian/changelog index 870a8340..750991c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ livecd-rootfs (23.10.22) UNRELEASED; urgency=medium * Undo preseeding in reset_snapd_state. + * update-source-catalog: work better when we want a variation to point + at the base layer. -- Michael Hudson-Doyle Fri, 25 Aug 2023 11:44:57 +1200 diff --git a/update-source-catalog b/update-source-catalog index 0869dd39..fa1d17c1 100755 --- a/update-source-catalog +++ b/update-source-catalog @@ -37,12 +37,18 @@ for entry in output: if 'variations' not in template: print("Non unique id in source catalog but no variations!") sys.exit(1) - for k, variation in template['variations'].items(): + for variation in template['variations'].values(): variation['size'] = int(opts.size) entry.setdefault('variations', {}).update(template['variations']) break else: # No entry with this id found, so add a new one. + + if template['variations']: + for variation in template['variations'].values(): + if variation['path'] == opts.squashfs: + variation['size'] == int(opts.size) + template['size'] = int(opts.size) template['path'] = opts.squashfs