summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2013-10-24 13:04:53 +0200
committerJulian Andres Klode <jak@debian.org>2013-10-24 13:04:53 +0200
commit56ed099558a9f6e7137a8c113ca9efb2b2c1a1d2 (patch)
tree8b5a373936a8114aa782d289366745a0a3571e61 /apt
parente88b9997d141c71d5af260e119d551a0ad92d90a (diff)
downloadpython-apt-56ed099558a9f6e7137a8c113ca9efb2b2c1a1d2.tar.gz
apt/cache.py: Call os.path.abspath() on a supplied rootdir (LP: #792295)
When the rootdir option is set to a relative path, that path appears multiple times in the dir::state::status path, as we also prepend it there.
Diffstat (limited to 'apt')
-rw-r--r--apt/cache.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 928a6207..2f0eda59 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -81,6 +81,7 @@ class Cache(object):
# force apt to build its caches in memory
apt_pkg.config.set("Dir::Cache::pkgcache", "")
if rootdir:
+ rootdir = os.path.abspath(rootdir)
if os.path.exists(rootdir+"/etc/apt/apt.conf"):
apt_pkg.read_config_file(apt_pkg.config,
rootdir + "/etc/apt/apt.conf")