unattended-upgrades may hold back upgrades due to comparing package versions by their string representation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unattended-upgrades (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Without the fix u-u could not upgrade particular packages from -security. It could be observed in Cosmic with systemd security updates failing to install partly due to 239-7ubuntu10.10 being smaller than 239-7ubuntu10.8 when comparing them as strings:
https:/
[Test Case]
* The fix includes the extension of the build-time test cases to cover package sets with which u-u fails with without the fallback:
...
Running ./test_rewind.py with python3
DEBUG:root:
DEBUG:root:
...
With the unfixed version the test case fails here because u-u tries to upgrade test-package to version 12.0 because it does not find version 2.0 smaller.
[Regression Potential]
* The change is very small and isolated, but fixing it revealed the issue fixed in LP: #1821101. Since the found issue's fix introduces fallbacks when apt's resolver can't find a the solution it is unlikely that other failures are triggered by the fix.
description: | updated |
This bug was fixed in the package unattended-upgrades - 1.10ubuntu2
---------------
unattended-upgrades (1.10ubuntu2) disco; urgency=medium
* Compare apt.package.Version objects and not the versions' string
representation. (LP: #1820888)
This prevented adjusting candidates when the strings sorted differently.
Also extend tests to catch issue.
* Fall back to adjusting more packages' candidates
when a package from an allowed origin can't be marked to install/upgrade.
(LP: #1821101)
* Skip sending email when no package had to be installed, upgraded or removed
(LP: #1821103) (Closes: #924554)
-- Balint Reczey <email address hidden> Fri, 22 Mar 2019 20:42:08 +0100