dpkg: Fix caching of architecture name
Our deb-closure script would causes zillions of invocations of "dpkg --print-architecture", which is rather slow.
This commit is contained in:
parent
f4ec141869
commit
6751fac418
15
pkgs/tools/package-management/dpkg/cache-arch.patch
Normal file
15
pkgs/tools/package-management/dpkg/cache-arch.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Don't invoke "dpkg --print-architecture" for every call to
|
||||||
|
Dpkg::Arch::get_raw_build_arch().
|
||||||
|
|
||||||
|
diff -ru -x '*~' dpkg-1.16.9/scripts/Dpkg/Arch.pm dpkg-1.16.9-new/scripts/Dpkg/Arch.pm
|
||||||
|
--- dpkg-1.16.9/scripts/Dpkg/Arch.pm 2012-10-20 06:34:17.000000000 +0200
|
||||||
|
+++ dpkg-1.16.9-new/scripts/Dpkg/Arch.pm 2012-12-04 19:42:20.451002537 +0100
|
||||||
|
@@ -59,7 +59,7 @@
|
||||||
|
# dpkg-architecture itself, by avoiding computing the DEB_BUILD_
|
||||||
|
# variables when they are not requested.
|
||||||
|
|
||||||
|
- my $build_arch = `dpkg --print-architecture`;
|
||||||
|
+ $build_arch = `dpkg --print-architecture`;
|
||||||
|
syserr("dpkg --print-architecture failed") if $? >> 8;
|
||||||
|
|
||||||
|
chomp $build_arch;
|
@ -10,6 +10,8 @@ stdenv.mkDerivation {
|
|||||||
sha256 = "0ykby9x4x2zb7rfj30lfjcsrq2q32z2lnsrl8pbdvb2l9sx7zkbk";
|
sha256 = "0ykby9x4x2zb7rfj30lfjcsrq2q32z2lnsrl8pbdvb2l9sx7zkbk";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./cache-arch.patch ];
|
||||||
|
|
||||||
configureFlags = "--disable-dselect --with-admindir=/var/lib/dpkg PERL_LIBDIR=$(out)/${perl.libPrefix}";
|
configureFlags = "--disable-dselect --with-admindir=/var/lib/dpkg PERL_LIBDIR=$(out)/${perl.libPrefix}";
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user