From: Frank Lichtenheld Date: Sun, 17 Feb 2008 20:24:39 +0000 (+0100) Subject: Allow overriding $pkgdatadir in Dpkg X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b448927fb69ecbe502fbaa372b84543a8cf1f27d;p=dpkg Allow overriding $pkgdatadir in Dpkg * scripts/Dpkg.pm: Allow overriding $pkgdatadir with $ENV{DPKG_DATADIR}. * scripts/Makefile.am (check): Use DPKG_DATADIR. * debian/rules: Remove hack to copy data files to build directory. --- diff --git a/ChangeLog b/ChangeLog index 1e2c95e4..150571e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-02-17 Frank Lichtenheld + + * scripts/Dpkg.pm: Allow overriding $pkgdatadir + with $ENV{DPKG_DATADIR}. + * scripts/Makefile.am (check): Use DPKG_DATADIR. + * debian/rules: Remove hack to copy data files + to build directory. + + 2008-02-17 Frank Lichtenheld Matthias Klose diff --git a/debian/rules b/debian/rules index 6bc9a2e8..73855d8c 100755 --- a/debian/rules +++ b/debian/rules @@ -55,7 +55,6 @@ build-tree/config.status: configure --localstatedir=/var/lib \ --with-zlib=static \ --with-bz2=static - cp cputable ostable triplettable build-tree/ # Build the package in build-tree build: build-tree/config.status diff --git a/man/dpkg-architecture.1 b/man/dpkg-architecture.1 index c7f625db..e6ed34a1 100644 --- a/man/dpkg-architecture.1 +++ b/man/dpkg-architecture.1 @@ -267,7 +267,8 @@ dpkg\-architecture \-ai386 \-ilinux\-any . .SH FILES All these files have to be present for \fBdpkg-architecture\fP to -work. +work. Their location can be overriden at runtime with the environment +variable DPKG_DATADIR. .TP .I /usr/share/dpkg/cputable Table of known CPU names and mapping to their GNU name. diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm index 4a5dcbbf..30993ef5 100644 --- a/scripts/Dpkg.pm +++ b/scripts/Dpkg.pm @@ -19,5 +19,6 @@ our $version = "1.14"; our $admindir = "/var/lib/dpkg"; our $dpkglibdir = "."; our $pkgdatadir = ".."; +$pkgdatadir = $ENV{DPKG_DATADIR} if defined $ENV{DPKG_DATADIR}; 1; diff --git a/scripts/Makefile.am b/scripts/Makefile.am index a0b1a963..b003137f 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -163,4 +163,4 @@ check: $(TEST_FILES) $(wildcard $(srcdir)/t/200_Dpkg_Shlibs/ld.so.conf*) # a bit hacky... $(mkdir_p) t.tmp cp -dRl $(srcdir)/t/200_Dpkg_Shlibs/ld.so.conf* t.tmp/ - srcdir=$(srcdir) PERL5LIB=$(srcdir) PERL_DL_NONLAZY=1 $(PERL) -I$(srcdir) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '.')" $(TEST_FILES) + srcdir=$(srcdir) PERL5LIB=$(srcdir) DPKG_DATADIR=$(srcdir)/.. PERL_DL_NONLAZY=1 $(PERL) -I$(srcdir) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '.')" $(TEST_FILES)