summaryrefslogtreecommitdiff
path: root/scripts/Dpkg.pm
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-09-04 18:21:02 +0200
committerGuillem Jover <guillem@debian.org>2016-10-30 05:27:44 +0100
commitc3a9a82fcf58df34077638cdbfd7bb752624629e (patch)
tree33460a7c932f5b791c871f3d44c166229654f48c /scripts/Dpkg.pm
parent33e6fcb5cd9b478e1646b50d247c233edcbd0088 (diff)
downloaddpkg-c3a9a82fcf58df34077638cdbfd7bb752624629e.tar.gz
build: Do not honor DPKG_DATADIR on the installed Dpkg module
Move the environment variable DPKG_DATADIR override for Dpkg::DATADIR into the first assignment, so that the new replacement logic can make it disappear at installation time. This simplifies the code and reduces the exposure of this internal purpose machinery.
Diffstat (limited to 'scripts/Dpkg.pm')
-rw-r--r--scripts/Dpkg.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm
index deecfb35d..89964b40a 100644
--- a/scripts/Dpkg.pm
+++ b/scripts/Dpkg.pm
@@ -87,8 +87,7 @@ our $PROGVERSION = '1.18.x';
our $CONFDIR = '/etc/dpkg';
our $ADMINDIR = '/var/lib/dpkg';
our $LIBDIR = '.';
-our $DATADIR = '..';
-$DATADIR = $ENV{DPKG_DATADIR} if defined $ENV{DPKG_DATADIR};
+our $DATADIR = $ENV{DPKG_DATADIR} // '..';
# XXX: Backwards compatibility, to be removed on VERSION 2.00.
## no critic (Variables::ProhibitPackageVars)