Cache remapping breaks hashing of Package objects
Bug #1780099 reported by
Julian Andres Klode
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
The apt.Package objects use the id as the hash, but the hash can change after reopening, meaning that code will fail to work, for example:
c=apt.Cache()
p=c["a"]
set_of_p={p}
c.open()
assert p in set_of_p
will fail.
[Test case]
The above test case is run as part of autopkgtest (syntax is slightly different), so passing autopkgtests means verification is done.
[Regression potential]
Hashing packages objects will be slower as it hashes the name and architecture now.
Changed in python-apt (Ubuntu): | |
status: | New → In Progress |
description: | updated |
tags: | added: id-5b3cdc9fd5afad903a1d027f |
Changed in python-apt (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in python-apt (Ubuntu): | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Hello Julian, or anyone else affected,
Accepted python-apt into bionic-proposed. The package will build now and be available at https:/ /launchpad. net/ubuntu/ +source/ python- apt/1.6. 2 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification- needed- bionic to verification- done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed- bionic. In either case, without details of your testing we will not be able to proceed.
Further information regarding the verification process can be found at https:/ /wiki.ubuntu. com/QATeam/ PerformingSRUVe rification . Thank you in advance!