snap-seed-parse.py: fix builds with no snaps.

canary-as-default
Michael Hudson-Doyle 1 year ago
parent 0d35c7645f
commit b91452e7fe

6
debian/changelog vendored

@ -1,3 +1,9 @@
livecd-rootfs (23.10.25) UNRELEASED; urgency=medium
* snap-seed-parse.py: fix builds with no snaps.
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 28 Aug 2023 14:02:08 +1200
livecd-rootfs (23.10.24) mantic; urgency=medium livecd-rootfs (23.10.24) mantic; urgency=medium
* update-source-catalog: Fix case where a variaton does not point at the * update-source-catalog: Fix case where a variaton does not point at the

@ -65,6 +65,10 @@ def make_manifest_from_seed_yaml(path):
def look_for_uc20_model(chroot): def look_for_uc20_model(chroot):
systems_dir = f"{chroot}/var/lib/snapd/seed/systems"
if not os.path.isdir(systems_dir):
log("no systems directory found")
return None
modeenv = f"{chroot}/var/lib/snapd/modeenv" modeenv = f"{chroot}/var/lib/snapd/modeenv"
system_name = None system_name = None
if os.path.isfile(modeenv): if os.path.isfile(modeenv):
@ -76,7 +80,7 @@ def look_for_uc20_model(chroot):
log(f"read system name {system_name!r} from modeenv") log(f"read system name {system_name!r} from modeenv")
break break
if system_name is None: if system_name is None:
system_names = os.listdir(f"{chroot}/var/lib/snapd/seed/systems") system_names = os.listdir(systems_dir)
if len(system_names) == 0: if len(system_names) == 0:
log("no systems found") log("no systems found")
return None return None

Loading…
Cancel
Save