Object of different cache passed as argument to apt_pkg.DepCache method
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned | ||
update-manager (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
Trusty |
Confirmed
|
Undecided
|
Unassigned | ||
Xenial |
Confirmed
|
Undecided
|
Unassigned | ||
Bionic |
Won't Fix
|
Undecided
|
Unassigned | ||
Cosmic |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Impact]
python-apt 1.6 raises an exception when objects of an old cache are passed to a apt_pkg.DepCache methods for a different cache. Prior to that, those would either segfault, succeed, or silently operate on a different object, as they use package/version ids, and e.g. two different packages in the old and new cache might have the same id.
With 1.6.1, we introduce a remapping algorithm that remaps objects of apt.Cache() when calling apt.Cache.open(), allowing old objects to be used after reopening, as long as they exist in the new cache. If they don't exist in the new cache, apt_pkg.
[Test case]
import apt
c=apt.Cache()
p=c["apt"]
c.open()
p.mark_install()
[Regression potential]
Could be remapping to wrong items which would cause us to install a wrong version, for example. Compared to pre-bionic, bionic is a regression already, though, and any regression caused here is less important than
what we have now.
[Original bug report]
The Ubuntu Error Tracker has been receiving reports about a problem regarding update-manager. This problem was most recently seen with package version 1:18.04.11, the problem page at https:/
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://
Related branches
- Brian Murray: Approve
- Julian Andres Klode: Pending requested
- Ubuntu Core Development Team: Pending requested
-
Diff: 336 lines (+76/-48)4 files modifiedUpdateManager/Core/UpdateList.py (+37/-21)
UpdateManager/UpdatesAvailable.py (+17/-17)
debian/changelog (+11/-0)
tests/test_update_list.py (+11/-10)
summary: |
- /usr/bin/update- - manager:ValueError:foreach_cb:packages_are_selected:is_selected:marked_install + Object of different cache passed as argument to apt_pkg.DepCache method |
description: | updated |
Changed in update-manager (Ubuntu Bionic): | |
status: | Confirmed → Triaged |
status: | Triaged → Won't Fix |
Changed in update-manager (Ubuntu Cosmic): | |
status: | Confirmed → Won't Fix |
Changed in python-apt (Ubuntu Cosmic): | |
status: | Confirmed → Fix Committed |
Changed in python-apt (Ubuntu Bionic): | |
status: | Confirmed → Triaged |
Changed in python-apt (Ubuntu Cosmic): | |
status: | Fix Committed → Confirmed |
status: | Confirmed → Fix Committed |
description: | updated |
no longer affects: | python-apt (Ubuntu Xenial) |
no longer affects: | python-apt (Ubuntu Trusty) |
Status changed to 'Confirmed' because the bug affects multiple users.