apparently broken dependency resolution
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unattended-upgrades (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
It looks as though unattended upgrades' dependency resolution is a little broken when there are multiple alternatives and when the dependency is currently satisfied by a package other than the first alternative.
In this case, package php5 was upgraded. php5 depends:
$ dpkg -s php5|grep Depends
Depends: libapache2-mod-php5 (>= 5.5.9+dfsg-
I use php5-fpm, and specifically do not want libapache2-mod-php5 installed (not least because it breaks my FPM config). After manually purging libapache2-
$ dpkg -l $(dpkg -s php5|grep Depends|perl -npe 's/Depends://; s/[,|]/\n/g'|cut -f 2 -d\ )|grep ^[a-z]
un libapache2-mod-php5 <none> <none> (no description available)
un libapache2-
un php5-cgi <none> <none> (no description available)
ii php5-common 5.5.9+dfsg-
ii php5-fpm 5.5.9+dfsg-
note that:
• php5-fpm is installed and therefore that dependency of php5 was already satisfied
• php5-cgi and libapache2-
For completeness' sake, here's an excerpt of the unattended upgrade log (full log attached) showing that it was this morning's upgrade run that installed libapache2-
Selecting previously unselected package libapache2-
Preparing to unpack .../libapache2-
Unpacking libapache2-mod-php5 (5.5.9+
Preparing to unpack .../php5_
Unpacking php5 (5.5.9+
Other requested information:
$ lsb_release -rd
Description: Ubuntu 14.04.2 LTS
Release: 14.04
$ apt-cache policy unattended-upgrades
unattended-
Installed: 0.82.1ubuntu2.1
Candidate: 0.82.1ubuntu2.1
Version table:
*** 0.82.1ubuntu2.1 0
500 http://
100 /var/lib/
0.82.1ubuntu2 0
500 http://
Changed in unattended-upgrades (Ubuntu): | |
importance: | Undecided → Medium |
Evidence from another machine I administer (same version of OS and unattended-upgrades and that uses a similar PHP configuration) suggests that the bug may only manifest if the previous state was 'un' rather than 'rc':
$ dpkg -l libapache2- mod-php5| grep ^[a-z]
rc libapache2-mod-php5 5.3.10-1ubuntu3.6 i386
on this machine, unattended upgrades did not attempt to install libapache2- mod-php5.