summaryrefslogtreecommitdiff
path: root/apt/cache.py
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-03-08 18:58:17 +0100
committerJulian Andres Klode <jak@debian.org>2009-03-08 18:58:17 +0100
commit162844cc03d669fd1aaf4a6cf9424597bb299264 (patch)
treea0887d64151344f48e221d6d41ed922abbc0bc36 /apt/cache.py
parent645c80f504f98332fb8eceb955c13a54e38e5956 (diff)
parent2342bc7c05da5589f166496fe1112b249598648f (diff)
downloadpython-apt-162844cc03d669fd1aaf4a6cf9424597bb299264.tar.gz
* Merge with mvo
Diffstat (limited to 'apt/cache.py')
-rw-r--r--apt/cache.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 1b5531ac..9f00b8a5 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -51,6 +51,10 @@ class Cache(object):
# force apt to build its caches in memory
apt_pkg.Config.Set("Dir::Cache::pkgcache", "")
if rootdir:
+ if os.path.exists(rootdir+"/etc/apt/apt.conf"):
+ apt_pkg.ReadConfigFile(apt_pkg.Config, rootdir+"/etc/apt/apt.conf")
+ if os.path.isdir(rootdir+"/etc/apt/apt.conf.d"):
+ apt_pkg.ReadConfigDir(apt_pkg.Config, rootdir+"/etc/apt/apt.conf.d")
apt_pkg.Config.Set("Dir", rootdir)
apt_pkg.Config.Set("Dir::State::status",
rootdir + "/var/lib/dpkg/status")
@@ -85,9 +89,7 @@ class Cache(object):
last=i
# drop stuff with no versions (cruft)
if len(pkg.VersionList) > 0:
- self._dict[pkg.Name] = Package(self._cache, self._depcache,
- self._records, self._list,
- self, pkg)
+ self._dict[pkg.Name] = Package(self, pkg)
i += 1
if progress is not None: