[Merge] ~marcustomlinson/ubuntu-release-upgrader:ubuntu/master into ubuntu-release-upgrader:ubuntu/master

Iain Lane iain at orangesquash.org.uk
Tue Feb 25 17:28:32 UTC 2020



Diff comments:

> diff --git a/DistUpgrade/DistUpgradeQuirks.py b/DistUpgrade/DistUpgradeQuirks.py
> index 511fb58..cea673e 100644
> --- a/DistUpgrade/DistUpgradeQuirks.py
> +++ b/DistUpgrade/DistUpgradeQuirks.py
> @@ -844,18 +847,30 @@ class DistUpgradeQuirks(object):
>              migration: version strings for upgrade (from and to) and the list
>              of snaps (with actions).
>          """
> +        import json
>          self._snap_list = {}
> -        # gtk-common-themes isn't a package name but is this risky?
>          from_channel = "stable/ubuntu-%s" % self._from_version
>          to_channel = "stable/ubuntu-%s" % self._to_version
> -        snaps = {'core18': ('stable', 'stable'),
> -                 'gnome-3-28-1804': (from_channel, to_channel),
> -                 'gtk-common-themes': (from_channel, to_channel),
> -                 'gnome-calculator': (from_channel, to_channel),
> -                 'gnome-characters': (from_channel, to_channel),
> -                 'gnome-logs': (from_channel, to_channel)}
> +        seeded_snaps = {}
> +        unseeded_snaps = {}
> +
> +        current_path = os.path.dirname(os.path.abspath(__file__))
> +        d2s_file = open(current_path + '/deb2snap.json', 'r')

Ah, forget this one, I forgot it is just included in the tarball. (but then how is update-manager supposed to share it? it might want installing too for that reason? (there's a below comment about that))

> +        d2s = json.load(d2s_file)
> +
> +        for snap in d2s["seeded"]:
> +            seed = d2s["seeded"][snap]
> +            from_chan = from_channel if "from_channel" not in seed else seed["from_channel"]
> +            to_chan = to_channel if "to_channel" not in seed else seed["to_channel"]
> +            seeded_snaps[snap] = (seed["deb"], from_chan, to_chan)
> +
> +        for snap in d2s["unseeded"]:
> +            unseed = d2s["unseeded"][snap]
> +            from_chan = from_channel if "from_channel" not in unseed else unseed["from_channel"]
> +            unseeded_snaps[snap] = (unseed["deb"], from_chan)
> +
>          self._view.updateStatus(_("Checking for installed snaps"))
> -        for snap, (from_channel, to_channel) in snaps.items():
> +        for snap, (deb, from_channel, to_channel) in seeded_snaps.items():
>              snap_object = {}
>              # check to see if the snap is already installed
>              snap_info = subprocess.Popen(["snap", "info", snap],


-- 
https://code.launchpad.net/~marcustomlinson/ubuntu-release-upgrader/+git/ubuntu-release-upgrader/+merge/379726
Your team Ubuntu Core Development Team is subscribed to branch ubuntu-release-upgrader:ubuntu/master.



More information about the Ubuntu-reviews mailing list