Regression: xenial: Uses apt_pkg.Error, which is only available in later versions
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
python-apt (Ubuntu) | ||||||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
The last SRU introduced a regression in error handling, where apt_pkg.Error is being caught - but that class is not available in xenial - it still uses SystemError
[Test case]
Run python3 -c "import apt; apt.Cache(
You should see:
# <command>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
raise LockFailedExcep
apt.cache.
Currently you see:
# <command>
Traceback (most recent call last):
File "/usr/lib/
return self._lock.
SystemError: E:Could not get lock /var/lib/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
with _WrappedLock(
File "/usr/lib/
except apt_pkg.Error as e:
AttributeError: module 'apt_pkg' has no attribute 'Error'
[Regression potential]
It really can't get worse than this. But FWIW: This only affects code paths where we could not lock the lists/ or archives/ directory - they currently throw the AttributeError, and will then throw LockFailedException again - as they did before the SRU.
description: | updated |
Changed in python-apt (Ubuntu): | |
status: | New → Invalid |
Changed in python-apt (Ubuntu Xenial): | |
status: | New → Triaged |
tags: | added: regression-update |
Changed in python-apt (Ubuntu Xenial): | |
status: | Triaged → In Progress |
no longer affects: | python-apt (Ubuntu) |
Hello Julian, or anyone else affected,
Accepted python-apt into xenial-proposed. The package will build now and be available at https:/ /launchpad. net/ubuntu/ +source/ python- apt/1.1. 0~beta1ubuntu0. 16.04.5 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- xenial to verification- done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed- xenial. 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 for helping!
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.