[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#728274: python-apt: apt.conf used from /etc/apt instead of root_dir + etc/apt



Control: reopen -1
Control: found -1 0.9.3.2

On Wed, Oct 30, 2013 at 08:20:38AM +0100, Thomas Bechtold wrote:
> Package: python-apt
> Version: 0.9.1
> Severity: normal
> 
> Dear Maintainer,
> 
> I tried to use python-apt to get all available package versions. I used
> the 'rootdir' parameter for apt.Cache to have a seperate root dir and
> seperated config files.
> In my /etc/apt/apt.conf , I have the following line:
> 
> APT::Default-Release "sid";
> 
> In my root-dir, I create an empty 'rootdir/etc/apt/apt.conf' and when I
> try to init the apt.Cache, I get the following error:
> 
> Traceback (most recent call last):
>   File "./python-apt-repro-test", line 31, in <module>
>     cache = apt.Cache(rootdir=root_dir, memonly=False)
>   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__
>     self.open(progress)
>   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open
>     self._cache = apt_pkg.Cache(progress)
> SystemError: E:The value 'sid' is invalid for APT::Default-Release as such a release is not available in the sources
> 
> 
> Attached is a test program which results in this error (but you have add
> the "APT::Default-Release" line to your /etc/apt/apt.conf).

The fix for this bug has been reverted in 0.9.3.2 because it breaks
existing code.

 python-apt (0.9.3.2) unstable; urgency=high
 .
   * Revert "* apt/cache.py:" (rootdir change) (Closes: #741251) (LP: #1288171)
 .
     We cannot reset the configuration when rootdir is specified in
     apt.Cache(). This reopens: #728274.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Please do not top-post if possible.


Reply to: