removal of priority changed packages breaks builds of the core snap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
live-build (Ubuntu) |
Fix Released
|
Critical
|
Adam Conrad | ||
Xenial |
Fix Released
|
Critical
|
Adam Conrad |
Bug Description
Impact: core builds fail
Fix: simplify demotion removals
Testcase: rebuild ubuntu core snap and confirm build
Regression Potential: low as builds do not work at the current time
====
the fix for bug 1668847 seems to cause a removal of systemd-sysv (and installation of upstart) in the ubuntu core snap builds, which makes teh build fail now.
a log of the last successful build of the core snap:
https:/
a log of a current failing build:
https:/
it removes locales properly but then tries to also remove systemd-sysv in the lb_chroot_archives step
Changed in live-build (Ubuntu): | |
importance: | Undecided → Critical |
Changed in live-build (Ubuntu): | |
assignee: | Andy Whitcroft (apw) → Adam Conrad (adconrad) |
Changed in live-build (Ubuntu Xenial): | |
assignee: | nobody → Adam Conrad (adconrad) |
importance: | Undecided → Critical |
The image fails to build because we attempt to remove the systemd-sysv from the system. We do this because there is a newer version of systemd-sysv in an applied PPA for this build and that version is marked as Priority: important.
$ apt-cache show systemd-sysv | egrep Priority\|Version
Priority: important
Version: 229-4ubuntu16+ppa2
Priority: required
Version: 229-4ubuntu16
Priority: required
Version: 229-4ubuntu10
Priority: required
Version: 229-4ubuntu4
$
This leads us to attempt to remove the package. The removal only deletes that one package so it is deemed removable and all hell breaks loose. The removal of this package triggers a pile of installations of new packages presumably for dependencies with alternatives which are satisfiable. In this case with a complete switch to upstart.
I believe there are two main bugs in this code. Firstly we should only be taking into account the latest version available for Priority: detection; otherwise we could switch a package back to required and it would still be removed (though in this case the removal is valid based on priority). Secondly we should not be only considering removals when testing the apt-get remove we should also consider whether its removal triggers installation of new packages; this latter implies there is a dependency but an alternative could be found.