apt_pkg.Cache() E: Read error - read (21: is a directory)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu Release:
12.04 precise beta 2
Description: Ubuntu precise (development branch)
Release: 12.04
Up to date as of 0100h GMT 18/4
$ apt-cache policy python-apt
python-apt:
Installed: 0.8.3ubuntu6
Candidate: 0.8.3ubuntu6
Version table:
*** 0.8.3ubuntu6 0
500 http://
100 /var/lib/
=======
Attempting to use python-apt to manipulate a debootstrapped precise chroot - when I attempt to get a cache object from the chroot, the following error occurs:
cache = apt_pkg.
SystemError: E:Read error - read (21: Is a directory), E:The package lists or status file could not be parsed or opened.
Extra testing:
* The same code functions perfectly on an 11.04 host with a debootstrapped precise chroot
* The same error appears on a 12.04 host with a debootstrapped oneric (11.10) chroot
* chrooting in with a bash shell and executing apt commands works
To replicate,
* on a precise host, debootstrap a precise or oneiric chroot
* start a python shell
>>> import apt_pkg
>>> import apt
>>> apt_pkg.
>>> apt_pkg.
>>> apt_pkg.
>>> apt_pkg.
>>> apt_pkg.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: E:Read error - read (21: Is a directory), E:The package lists or status file could not be parsed or opened.
>>> apt.progress.
<apt.progress.
>>> apt_pkg.Cache()
Reading package lists... Error!
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: E:Read error - read (21: Is a directory), E:The package lists or status file could not be parsed or opened.
>>>
Changed in python-apt (Ubuntu): | |
status: | Expired → New |
affects: | python-apt (Ubuntu) → apt (Ubuntu) |
This has been resolved in python-apt 0.8.3ubuntu7
It must have been related to #659438
Thanks for fixing :)