[dpkg] 54/200: build: Honor DPKG_DATADIR again in the installed Dpkg modules
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:17:15 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository dpkg.
commit 4fbf5294c525ec10408b876d0e2dbc7ea99757b2
Author: Guillem Jover <guillem at debian.org>
Date: Sun Dec 4 22:55:15 2016 +0100
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.
---
debian/changelog | 2 ++
scripts/Dpkg.pm | 4 +++-
scripts/Makefile.am | 14 +++++++-------
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 39fce9c..429bcb7 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 c5ee468..1b9624c 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 16b4ecc..5583fa9 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)\":"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list