[Bug 792295] Re: Cache(rootdir) needs to be absolute

Launchpad Bug Tracker 792295 at bugs.launchpad.net
Thu Mar 13 06:39:00 UTC 2014


This bug was fixed in the package python-apt - 0.9.3.2

---------------
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 <jak at debian.org>  Mon, 10 Mar 2014 14:32:53
+0100

** Changed in: python-apt (Ubuntu)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/792295

Title:
  Cache(rootdir) needs to be absolute

Status in “python-apt” package in Ubuntu:
  Fix Released

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/sources.list* -a apt-test/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(rootdir='apt-test')
  creating:  apt-test/var/lib/dpkg
  creating:  apt-test/var/cache/apt/archives/partial
  creating:  apt-test/var/lib/apt/lists/partial
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 93, in __init__
      self.open(progress)
    File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 136, in open
      self._cache = apt_pkg.Cache(progress)
  SystemError: E:Could not open file apt-test/var/lib/apt/apt-test/var/lib/dpkg/status - open (2: No such file or directory), E:The package lists or status file could not be parsed or opened.

  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,

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/792295/+subscriptions



More information about the foundations-bugs mailing list