[PATCH] FIX: unable to access dpkg status area

Geert Stappers <[email protected]>
Newsgroups gmane.linux.debian.devel.embedded
Message-ID <[email protected]>
There was the error message
 dpkg: error: unable to access dpkg status area: No such file or directory

Adding the admin directory to dpkg did fix it, at least for stappers
---
 polystrap.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/polystrap.sh b/polystrap.sh
index 212438b..1c2c910 100755
--- a/polystrap.sh
+++ b/polystrap.sh
@@ -143,7 +143,7 @@ for script in $ROOTDIR/var/lib/dpkg/info/*.preinst; do
 done
 
 # run dpkg --configure -a twice because of errors during the first run
-fakechroot chroot $ROOTDIR /usr/bin/dpkg --configure -a || fakechroot chroot $ROOTDIR /usr/bin/dpkg --configure -a
+fakechroot chroot $ROOTDIR /usr/bin/dpkg --admindir=var/lib/dpkg --configure -a || fakechroot chroot $ROOTDIR /usr/bin/dpkg --admindir=var/lib/dpkg --configure -a
 
 # source hooks
 if [ -r "$PLATFORM/hooks" ]; then
-- 
1.7.5.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.