Cache(rootdir) needs to be absolute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-apt
Hi
When instanciating an apt.Cache with a rootdir, it will break if it's not absolute:
mkdir -p apt-test/etc/apt
cp /etc/apt/
% python
Python 2.7.2rc1 (default, May 31 2011, 11:34:02)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import apt
>>> apt.Cache(
creating: apt-test/
creating: apt-test/
creating: apt-test/
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
self.
File "/usr/lib/
self._cache = apt_pkg.
SystemError: E:Could not open file apt-test/
this with oneiric, apt 0.8.14.1ubuntu5 and python-apt 0.8.0~exp4ubuntu1.
apt.conf RootDir and python-apt's Cache.__doc__ don't say rootdir needs to be absolute; perhaps some piece of apt is broken WRT to rootdir, perhaps python-apt should make the path absolute, or perhaps the docs need to be updated to require an absolute dir.
Cheers,
http:// anonscm. debian. org/gitweb/ ?p=apt/ python- apt.git; a=commit; h=56ed099558a9f 6e7137a8c113ca9 efb2b2c1a1d2