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

Michael Vogt michael.vogt at canonical.com
Mon Apr 20 15:46:53 UTC 2020


Thanks for this PR. I think it's the right way to fix this issue. It's a bit annoying this has to be special cased in the generic installTasks() code, normally there is the "quirks" system for this. But given the nature of the issue it's the best place. 

Fwiw, I wonder if removing systemd-timesyncd from the minimal task would be more appropriate, I think this should fix the issue as well because then the systemd-timesyscnd install would be handled via a dependency of systemd (wich is also task minimal) and there apt should DTRT because there is already a or-dependency. So with that change this PR would not be needed and I don't see any downside - but I also have not tested it (but that should be easy but just stopping the upgrade and cowboying /var/lib/apt/lists/*focal*Packages into the right shape and then starting the upgrade again without running a apt.update() in the release upgrader).

Diff comments:

> diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py
> index 3cd8504..0ff82f2 100644
> --- a/DistUpgrade/DistUpgradeCache.py
> +++ b/DistUpgrade/DistUpgradeCache.py
> @@ -829,6 +829,13 @@ class MyCache(apt.Cache):
>      def installTasks(self, tasks):
>          logging.debug("running installTasks")
>          for pkg in self:
> +            if pkg.name == "systemd-timesyncd" \

(nitpick^2): I prefer "(" around the if instead of using a \ to concat the lines but that's really a absolute nitpick

> +               and any(p.is_installed for p in self.get_providing_packages(
> +                   "time-daemon")):
> +                # systemd Depends: systemd-timesyncd | time-daemon
> +                # Let the installed time-daemon kept installed and don't
> +                # replace it with systemd-timesyncd. See LP: #1872902
> +                continue
>              if pkg.marked_install or pkg.is_installed:
>                  continue
>              self._lookupPkgRecord(pkg)


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



More information about the Ubuntu-reviews mailing list