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