diff options
author | Guillem Jover <guillem@debian.org> | 2016-12-04 22:55:15 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2016-12-17 01:41:18 +0100 |
commit | 4fbf5294c525ec10408b876d0e2dbc7ea99757b2 (patch) | |
tree | 418c4f48a5ce7080c373b5bf857590d52ea917dd | |
parent | cfa3c832fe5a20dbbd2addf45e61f143ac4d745d (diff) | |
download | dpkg-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.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | scripts/Dpkg.pm | 4 | ||||
-rw-r--r-- | scripts/Makefile.am | 14 |
3 files changed, 12 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog index 39fce9c6f..429bcb78c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ dpkg (1.18.16) UNRELEASED; urgency=medium switched to be a perl module. Missed in dpkg 1.18.8. * Build system: - Enable compression libs also in automatic check mode in configure. + - Honor DPKG_DATADIR again in the installed Dpkg modules. This was an + explicit public interface, documented in the man page. [ Updated scripts translations ] * German (Helge Kreutzmann). 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) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 16b4eccbd..5583fa960 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -126,13 +126,13 @@ man3_MANS = do_perl_subst = $(AM_V_GEN) sed \ -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ - -e "s:\$$CONFDIR = .*;:\$$CONFDIR = '$(pkgconfdir)';:" \ - -e "s:\$$ADMINDIR = .*;:\$$ADMINDIR = '$(admindir)';:" \ - -e "s:\$$LIBDIR = .*;:\$$LIBDIR = '$(pkglibdir)';:" \ - -e "s:\$$DATADIR = .*;:\$$DATADIR = '$(pkgdatadir)';:" \ - -e "s:\$$PROGMAKE = .*;:\$$PROGMAKE = '$(MAKE)';:" \ - -e "s:\$$PROGTAR = .*;:\$$PROGTAR = '$(TAR)';:" \ - -e "s:\$$PROGVERSION = .*;:\$$PROGVERSION = '$(PACKAGE_VERSION)';:" + -e "s:our \$$CONFDIR = .*;:our \$$CONFDIR = '$(pkgconfdir)';:" \ + -e "s:our \$$ADMINDIR = .*;:our \$$ADMINDIR = '$(admindir)';:" \ + -e "s:our \$$LIBDIR = .*;:our \$$LIBDIR = '$(pkglibdir)';:" \ + -e "s:our \$$DATADIR = .*;:our \$$DATADIR = '$(pkgdatadir)';:" \ + -e "s:our \$$PROGMAKE = .*;:our \$$PROGMAKE = '$(MAKE)';:" \ + -e "s:our \$$PROGTAR = .*;:our \$$PROGTAR = '$(TAR)';:" \ + -e "s:our \$$PROGVERSION = .*;:our \$$PROGVERSION = '$(PACKAGE_VERSION)';:" do_shell_subst = $(AM_V_GEN) sed \ -e "s:^version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:version=\"$(PACKAGE_VERSION)\":" |