浏览代码

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.
Frank Lichtenheld 18 年之前
父节点
当前提交
b448927fb6
共有 5 个文件被更改,包括 13 次插入3 次删除
  1. 9 0
      ChangeLog
  2. 0 1
      debian/rules
  3. 2 1
      man/dpkg-architecture.1
  4. 1 0
      scripts/Dpkg.pm
  5. 1 1
      scripts/Makefile.am

+ 9 - 0
ChangeLog

@@ -1,3 +1,12 @@
+2008-02-17  Frank Lichtenheld  <djpig@debian.org>
+
+	* 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  <djpig@debian.org>
 	    Matthias Klose  <doko@cs.tu-berlin.de>
 

+ 0 - 1
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

+ 2 - 1
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.

+ 1 - 0
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;

+ 1 - 1
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)