Bug#775258: dpkg-dev: dpkg-shlibdeps doesn't pass admindir parameter to nested dpkg --search
On Tue, 2015-01-13 at 09:09:29 -0500, Lukasz Jagielski wrote: On Tue, Jan 13, 2015 at 8:17 AM, Guillem Jover guil...@debian.org wrote: But in any case I don't think that using a different admindir is something really supported in normal packaging. My use case is i686 package compiled using sysroot on amd64 system, I want to use the same sysroot for deb generation. If this is for your own packages then sure, my comment above was for normal Debian packages, as there's no easy way to pass global arguments to the dpkg commands inside say debian/rules. Here's a patch that works for me http://pastebin.com/6mfeVgKc Thanks, I had fixed it differently though, with the attached patch. Which will be pushing quickly to master. Thanks, Guillem From a43c0dee759079e50bad4d6c9c5b5b15408afe6e Mon Sep 17 00:00:00 2001 From: Guillem Jover guil...@debian.org Date: Tue, 13 Jan 2015 14:20:04 +0100 Subject: [PATCH] dpkg-shlibdeps: Use dpkg-query instead of dpkg for --search This has the effect of honoring the admindir passed as an environment variable, as dpkg sets the variable unconditionally, but dpkg-query does honor it. Closes: #775258 --- scripts/dpkg-shlibdeps.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 57e6a76..520b24f 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -838,14 +838,14 @@ sub find_packages { return $pkgmatch unless scalar(@files); my $pid = open(my $dpkg_fh, '-|'); -syserr(g_('cannot fork for %s'), 'dpkg --search') unless defined($pid); +syserr(g_('cannot fork for %s'), 'dpkg-query --search') unless defined $pid; if (!$pid) { # Child process running dpkg --search and discarding errors close STDERR; open STDERR, '', '/dev/null' or syserr(g_('cannot open file %s'), '/dev/null'); $ENV{LC_ALL} = 'C'; - exec('dpkg', '--search', '--', @files) + exec 'dpkg-query', '--search', '--', @files or syserr(g_('unable to execute %s'), 'dpkg'); } while ($dpkg_fh) { -- 2.2.1.209.g41e5f3a
Bug#775258: dpkg-dev: dpkg-shlibdeps doesn't pass admindir parameter to nested dpkg --search
Hi, My use case is i686 package compiled using sysroot on amd64 system, I want to use the same sysroot for deb generation. Here's a patch that works for me http://pastebin.com/6mfeVgKc Regards, Lukasz On Tue, Jan 13, 2015 at 8:17 AM, Guillem Jover guil...@debian.org wrote: Hi! On Tue, 2015-01-13 at 05:20:07 -0500, Lukasz Jagielski wrote: Package: dpkg-dev Version: 1.17.23 Severity: normal I've run into this problem when trying to generate dpkg packages using non-standard dpkg admin dir. I've noticed that dpkg-shlibdeps doesn't fully honour --admindir parameter, since its internal call to dpkg --search isn't provided with it. Ah right, I'm fixing this for 1.18.x (targetted at Stretch). I'll check if there's other dpkg invocations from dpkg-dev scripts. But in any case I don't think that using a different admindir is something really supported in normal packaging. Thanks, Guillem
Bug#775258: dpkg-dev: dpkg-shlibdeps doesn't pass admindir parameter to nested dpkg --search
Package: dpkg-dev Version: 1.17.23 Severity: normal Dear Maintainer, I've run into this problem when trying to generate dpkg packages using non-standard dpkg admin dir. I've noticed that dpkg-shlibdeps doesn't fully honour --admindir parameter, since its internal call to dpkg --search isn't provided with it. Regards, Lukasz Jagielski -- System Information: Debian Release: 8.0 APT prefers testing-updates APT policy: (500, 'testing-updates'), (500, 'testing') Architecture: i386 (i686) Kernel: Linux 3.16.0-4-686-pae (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dpkg-dev depends on: ii base-files 8 ii binutils 2.24.90.20141023-1 ii bzip2 1.0.6-7+b2 ii libdpkg-perl 1.17.23 ii make-guile [make] 4.0-8 ii patch 2.7.1-6 ii xz-utils 5.1.1alpha+20120614-2+b3 Versions of packages dpkg-dev recommends: ii build-essential 11.7 ii fakeroot 1.20.2-1 ii gcc [c-compiler] 4:4.9.1-5 ii gcc-4.9 [c-compiler] 4.9.1-19 ii gnupg1.4.18-6 ii gnupg2 2.0.26-3 ii gpgv 1.4.18-6 ii libalgorithm-merge-perl 0.08-2 Versions of packages dpkg-dev suggests: pn debian-keyring none -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#775258: dpkg-dev: dpkg-shlibdeps doesn't pass admindir parameter to nested dpkg --search
Hi! On Tue, 2015-01-13 at 05:20:07 -0500, Lukasz Jagielski wrote: Package: dpkg-dev Version: 1.17.23 Severity: normal I've run into this problem when trying to generate dpkg packages using non-standard dpkg admin dir. I've noticed that dpkg-shlibdeps doesn't fully honour --admindir parameter, since its internal call to dpkg --search isn't provided with it. Ah right, I'm fixing this for 1.18.x (targetted at Stretch). I'll check if there's other dpkg invocations from dpkg-dev scripts. But in any case I don't think that using a different admindir is something really supported in normal packaging. Thanks, Guillem -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org