apt behaviour when package with strict dependencies rules and version -gt in -updates than -security.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
Xenial |
Won't Fix
|
Undecided
|
Unassigned | ||
Bionic |
Won't Fix
|
Undecided
|
Unassigned | ||
landscape-client (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
Xenial |
Won't Fix
|
Undecided
|
Unassigned | ||
Bionic |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Impact]
We notice that situation while investigating a security update using Landscape, but it also applies to 'apt' outside the Landscape context.
'apt' should be smarter to detect/install packages with strict dependencies such as systemd[1] when a version is specified for upgrade (Ex: $ apt-get install systemd=
It should automatically install the dependencies (if any) from that same version as well instead of failing trying to install the highest version available (if any) while installing the specified version for the one mentionned :
=======
$ apt-get install systemd=
....
"systemd : Depends: libsystemd0 (= 229-4ubuntu21.1) but 229-4ubuntu21.4 is to be installed"
=======
To face that problem :
- Package with lower version should be found in -security ( Ex: systemd/
- Package with higher version should be found in -updates ( Ex: systemd/
- Package should have strict dependencies ( Ex: libsystemd0 (= ${binary:Version}) )
- The upgrade should only specify version for the package, without it's dependencies. (Ex: $ apt-get install systemd=
Using systemd is a good reproducer, I'm sure finding other package with the same situation is easy.
It has been easily reproduced with systemd on Xenial and Bionic so far.
[1] debian/control
Depends: ${shlibs:Depends},
${misc:Depends},
libsystemd0 (= ${binary:Version}),
...
[Workaround]
If package + dependencies are specified, the upgrade work just fine :
Ex: $ apt-get install systemd=
description: | updated |
tags: | added: sts |
description: | updated |
description: | updated |
description: | updated |
Changed in apt (Ubuntu): | |
status: | Confirmed → Won't Fix |
Changed in apt (Ubuntu Xenial): | |
status: | Confirmed → Won't Fix |
Changed in apt (Ubuntu Bionic): | |
status: | Confirmed → Won't Fix |
Changed in landscape-client (Ubuntu): | |
status: | New → Won't Fix |
Changed in landscape-client (Ubuntu Xenial): | |
status: | New → Won't Fix |
Changed in landscape-client (Ubuntu Bionic): | |
status: | New → Won't Fix |
Status changed to 'Confirmed' because the bug affects multiple users.