Source: dpkg-cross
Version: 2.6.11
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

dpkg-cross assumes that DEB_HOST_GNU_TYPE == DEB_HOST_MULTIARCH. Thus it
queries for the former and then uses that triplet to look for libraries
in /usr/lib. Unfortunately for i386 this assumption is violated. Thus
i386 packages end up being emptied.

I am attaching a patch that adds the distinction and produces reasonable
packages when operating on i386. This patch is crafted in a way that it
even applies after applying #771497 and #772045 (extra hunk header).

Helmut
diff -Nru dpkg-cross-2.6.11/debian/changelog 
dpkg-cross-2.6.11+nmu1/debian/changelog
--- dpkg-cross-2.6.11/debian/changelog  2013-05-24 21:28:56.000000000 +0200
+++ dpkg-cross-2.6.11+nmu1/debian/changelog     2014-12-15 10:48:28.000000000 
+0100
@@ -1,3 +1,11 @@
+dpkg-cross (2.6.11+nmu1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * DEB_HOST_GNU_TYPE and DEB_HOST_MULTIARCH are not necessarily equal.
+    (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 15 Dec 2014 10:47:58 +0100
+
 dpkg-cross (2.6.11) unstable; urgency=low
 
   * Upload changes from experimental to unstable.
diff -Nru dpkg-cross-2.6.11/dpkg-cross dpkg-cross-2.6.11+nmu1/dpkg-cross
--- dpkg-cross-2.6.11/dpkg-cross        2013-05-24 21:28:22.000000000 +0200
+++ dpkg-cross-2.6.11+nmu1/dpkg-cross   2014-12-15 10:41:35.000000000 +0100
@@ -14,7 +14,8 @@
 @keepdeps $dpkg_statfile $progname $debname $anyway $cross2cross $crosstype
 $crossdir $crosslib $crosslib64 $crosslib32 $crossinc $data $len
 $retval $dpkg_cmd $mode $pkg @exlist $conffile $removedeps $keepdeps
-$DPKGCROSSVERSION $keep_temp $msg $multiarchpackage $multiarch $multiarchconv);
+$DPKGCROSSVERSION $keep_temp $msg $multiarchpackage $multiarch
+$multiarchtriplet $multiarchconv);
 
 setlocale(LC_MESSAGES, "");
 textdomain("dpkg-cross");
@@ -723,6 +724,8 @@
        my $config = &get_config;
        $crosstype = `CC="" dpkg-architecture -f -a$arch -qDEB_HOST_GNU_TYPE 2> 
/dev/null`;
        chomp ($crosstype);
+       $multiarchtriplet = `CC="" dpkg-architecture -f -a$arch 
-qDEB_HOST_MULTIARCH 2> /dev/null`;
+       chomp ($multiarchtriplet);
        $crossinc = $$config{'crossinc'};
        $crossdir = $$config{'crossdir'};
        $crosslib = $$config{'crosslib'};
@@ -729,7 +732,7 @@
        $crosslib64 = $$config{'crosslib64'};
        $crosslib32 = $$config{'crosslib32'};
        # add extra regexp component for multiarch packages
-       if ($multiarchpackage) { $multiarch="\Q$crosstype/\E" } else 
{$multiarch=""};
+       if ($multiarchpackage) { $multiarch="\Q$multiarchtriplet/\E" } else 
{$multiarch=""};
 
        # Now process regular files ...
        open(PIPE, "find $src/ -type f -print |") or goto fail;
@@ -738,8 +741,8 @@
                s/^$src//;
                /^DEBIAN/ && next;
                # if we have library files on multiarch paths, treat deb like a 
multiarch package
-               if (m:^(/usr)?/lib/\Q$crosstype/\E:) { 
-                       $multiarch="\Q$crosstype/\E"
+               if (m:^(/usr)?/lib/\Q$multiarchtriplet/\E:) { 
+                       $multiarch="\Q$multiarchtriplet/\E"
                        }
                # special support for generated cache data
                if (m:(/etc/dpkg-cross/cross-config.d/($arch)?/.*):) {

Reply via email to