From fcd268692450231c98bfb6ac2e573ce466e014c7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 14 Nov 2011 14:07:38 +0100 Subject: * apt/cache.py: - set Dir::bin::dpkg if a alternate rootdir is given (LP: #885895) --- apt/cache.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt/cache.py') 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) -- cgit v1.2.3