Bug#619400: patch providing support for

Wookey <[email protected]>
Newsgroups gmane.linux.debian.devel.embedded
Organization Wookware
Message-ID <20110330124342.GC17337__38356.0444614433$1301491654$gmane$org@dream.aleph1.co.uk>
This patch allows dpkg-cross to handle packages which use multiarch
paths for libraries but are not yet marked co-installable with
Multi-Arch: field.

Index: dpkg-cross
===================================================================
RCS file: /cvsroot/dpkg-cross/dpkg-cross/dpkg-cross,v
retrieving revision 1.86
diff -u -r1.86 dpkg-cross
--- dpkg-cross	26 Mar 2011 13:43:41 -0000	1.86
+++ dpkg-cross	30 Mar 2011 12:32:41 -0000
@@ -55,12 +55,19 @@
 
 =head1 SYNOPSIS
 
- dpkg-cross [ -v | --verbose ] [ -q | --quiet ] [ -A | --convert-anyway ]
- [ -X | --exclude PACKAGE ] [ -k | --keep-temp ] { -i | --install 
- | -b | --build | -r | --remove | --purge | -s | --status | -l | --list 
- | -L | --list-files | -u | --update | -Q | --query } 
- { -a | --arch architecture} package [package ... ]
-
+ dpkg-cross [OPTIONS] [--install|-i] <files...>
+ dpkg-cross [OPTIONS] [--build|-b] <files...>
+ dpkg-cross [OPTIONS] [--remove|--purge|-r] <packages...>
+ dpkg-cross [OPTIONS] [--status|-s] <packages...>
+ dpkg-cross [OPTIONS] [--list|-l] <packages...>
+ dpkg-cross [OPTIONS] [--list-files|-L] <packages...>
+ dpkg-cross [OPTIONS] [--query|-Q] <pkgpath>
+ dpkg-cross [OPTIONS] [--update|-u] <pkgpath>
+ 
+ OPTIONS: [ -v | --verbose ] [ -q | --quiet ] 
+ { [ -a | --arch ] architecture } { [ -X | --exclude ] PACKAGE } 
+ [ -A | --convert-anyway ] [ -M | --convert-multiarch ]  [ -k | --keep-temp ] 
+ 
 =cut
 
 =head1 DESCRIPTION
@@ -522,7 +529,7 @@
 			$multiarchpackage=1;
 		} else {
 			my $output = basename ($package);
-			warn sprintf(_g("%s: Skipping the '%s' Multi-Arch package.\n"), $progname, $output);
+			warn sprintf(_g("%s: Skipping Multi-Arch package '%s'.\n"), $progname, $output);
 			if (not -f $output) {
 				open(CP, "$package");
 				my @cp=<CP>;
@@ -737,6 +744,10 @@
 		chomp;
 		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"
+			}
 		# special support for generated cache data
 		if (m:(/etc/dpkg-cross/cross-config.d/($arch)?/.*):) {
 			&ensure_dir("$dst$1");
@@ -778,10 +789,10 @@
 			# regular file under /usr/include/ or /usr/include/<triplet>
 			link_file("$src$_", "$dst$crossinc/$'") or goto fail;
 		} elsif (m:^/usr/(lib/$multiarch.*\.([hH]|[hH][hH]|[hH][pP][pP]))$:) {
-			# regular .h, .hh, or .hpp file under /usr/lib
+			# regular .h, .hh, or .hpp file under /usr/lib or /usr/lib/<triplet>
 			link_file("$src$_", "$dst$crossdir/$1") or goto fail;
 		} elsif (m:^/usr/lib/$multiarch([^/]+\.[ao])$:) {
-			# regular .a or .o file under /usr/lib
+			# regular .a or .o file under /usr/lib or /usr/lib/<triplet>
 			link_file("$src$_", "$dst$crosslib/$1") or goto fail;
 		} elsif (m:^/usr/lib64/([^/]+\.[ao])$:) {
 			# regular .a or .o file under /usr/lib64

	
Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.