summaryrefslogtreecommitdiff
path: root/scripts/Dpkg.pm
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-12-04 22:55:15 +0100
committerGuillem Jover <guillem@debian.org>2016-12-17 01:41:18 +0100
commit4fbf5294c525ec10408b876d0e2dbc7ea99757b2 (patch)
tree418c4f48a5ce7080c373b5bf857590d52ea917dd /scripts/Dpkg.pm
parentcfa3c832fe5a20dbbd2addf45e61f143ac4d745d (diff)
downloaddpkg-4fbf5294c525ec10408b876d0e2dbc7ea99757b2.tar.gz
build: Honor DPKG_DATADIR again in the installed Dpkg modules
This was an explicit public interface, documented in the man page. It is also the only way to cleanly override the architecture tables, which might be needed in certain circumstances. Partially revert the commit c3a9a82fcf58df34077638cdbfd7bb752624629e, but preserve the code simplification.
Diffstat (limited to 'scripts/Dpkg.pm')
-rw-r--r--scripts/Dpkg.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm
index c5ee468b3..1b9624c4d 100644
--- a/scripts/Dpkg.pm
+++ b/scripts/Dpkg.pm
@@ -100,7 +100,9 @@ our $PROGTAR = $ENV{DPKG_PROGTAR} // 'tar';
our $CONFDIR = '/etc/dpkg';
our $ADMINDIR = '/var/lib/dpkg';
our $LIBDIR = '.';
-our $DATADIR = $ENV{DPKG_DATADIR} // '..';
+our $DATADIR = '..';
+
+$DATADIR = $ENV{DPKG_DATADIR} if defined $ENV{DPKG_DATADIR};
# XXX: Backwards compatibility, to be removed on VERSION 2.00.
## no critic (Variables::ProhibitPackageVars)