The following commit has been merged in the master branch:
commit bf7b7023d4e67a82c71806cc65a5d83b0a2541f0
Author: Guillem Jover <[email protected]>
Date: Thu Feb 24 01:28:24 2011 +0100
Fix dpkg maintainer scripts to honour DPKG_ADMINDIR if present
This will allow the maintainer scripts to work properly if --admindir
has been passed to dpkg. Fallback to using the default admindir in case
we are being called from an old dpkg not setting the environment
variable.
diff --git a/debian/dpkg.lintian-overrides b/debian/dpkg.lintian-overrides
index 6b75f54..6a9c418 100644
--- a/debian/dpkg.lintian-overrides
+++ b/debian/dpkg.lintian-overrides
@@ -2,9 +2,9 @@ dpkg: redundant-origin-field
dpkg: redundant-bugs-field
dpkg: arch-dep-package-has-big-usr-share
# False positives, we read from a file not from a tty
-dpkg: read-in-maintainer-script preinst:39
dpkg: read-in-maintainer-script preinst:40
-dpkg: read-in-maintainer-script preinst:42
-dpkg: read-in-maintainer-script preinst:50
+dpkg: read-in-maintainer-script preinst:41
+dpkg: read-in-maintainer-script preinst:43
+dpkg: read-in-maintainer-script preinst:51
# On purpose, install-info is only a wrapper that will be removed soon
dpkg: binary-without-manpage usr/sbin/install-info
diff --git a/debian/dpkg.postinst b/debian/dpkg.postinst
index 5bf4563..874f75c 100755
--- a/debian/dpkg.postinst
+++ b/debian/dpkg.postinst
@@ -21,7 +21,7 @@
# Create the database files if they don't already exist
create_database() {
- admindir=/var/lib/dpkg
+ admindir=${DPKG_ADMINDIR:-/var/lib/dpkg}
for file in diversions statoverride status; do
if [ ! -f "$admindir/$file" ]; then
diff --git a/debian/dpkg.preinst b/debian/dpkg.preinst
index 3a9c0f6..13fcde3 100755
--- a/debian/dpkg.preinst
+++ b/debian/dpkg.preinst
@@ -28,7 +28,8 @@ upgrade_dpkg_non_conffile()
kill_bad_alternatives () {
local IFS=""
- ALTDIR="/var/lib/dpkg/alternatives"
+ admindir=${DPKG_ADMINDIR:-/var/lib/dpkg}
+ ALTDIR="$admindir/alternatives"
for alt in $ALTDIR/*; do
if [ ! -f $alt ]; then
# In case it's been removed by the code below, or in case
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]