Comment 1 for bug 1678042

Revision history for this message
Andy Whitcroft (apw) wrote :

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.