summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-11-14 14:07:38 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-11-14 14:07:38 +0100
commitfcd268692450231c98bfb6ac2e573ce466e014c7 (patch)
tree853bfbacc083ee4191ba9844b575c8c85cd3009e
parent628d7caf9ca6ee819398a4b88c23e42094fe2c10 (diff)
downloadpython-apt-fcd268692450231c98bfb6ac2e573ce466e014c7.tar.gz
* apt/cache.py:
- set Dir::bin::dpkg if a alternate rootdir is given (LP: #885895)
-rw-r--r--apt/cache.py4
-rw-r--r--debian/changelog3
2 files changed, 7 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index a4585277..8a456715 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -83,6 +83,10 @@ class Cache(object):
apt_pkg.config.set("Dir", rootdir)
apt_pkg.config.set("Dir::State::status",
rootdir + "/var/lib/dpkg/status")
+ # also set dpkg to the rootdir path so that its called for the
+ # --print-foreign-architectures call
+ apt_pkg.config.set("Dir::bin::dpkg",
+ os.path.join(rootdir, "usr", "bin", "dpkg"))
# create required dirs/files when run with special rootdir
# automatically
self._check_and_create_required_dirs(rootdir)
diff --git a/debian/changelog b/debian/changelog
index 58326dc2..14ee705e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,9 @@ python-apt (0.8.2) UNRELEASED; urgency=low
- remove "print" when creating dirs in apt.Cache(rootdir=dir),
thanks to Martin Pitt
* fix build against apt in experimental
+ * apt/cache.py:
+ - set Dir::bin::dpkg if a alternate rootdir is given
+ (LP: #885895)
[ Tshepang Lekhonkhobe ]
* rm usage of camelcase in cache.py doc (closes: #626617)