tag 688912 + patch
tag 688912 + pending
thanks

This is the patch I'll upload in a couple of days, at which point I'll
file the unblock request bug too.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Index: debian/changelog
===================================================================
--- debian/changelog	(working copy)
+++ debian/changelog	(working copy)
@@ -1,3 +1,13 @@
+emdebian-crush (2.2.19) unstable; urgency=low
+
+  * Check for MultiArch support in dpkg and force the multiarch
+    support in dpkg-cross if the requested architecture is in the
+    list of dpkg foreign architectures. (Closes: #688912)
+  * Limit installation to only packages successfully converted using
+    dpkg-cross.
+
+ -- Neil Williams <[email protected]>  Wed, 26 Sep 2012 22:16:57 +0100
+
 emdebian-crush (2.2.18) unstable; urgency=low
 
   * Implement the new lintian profile support
Index: xapt/xapt
===================================================================
--- xapt/xapt	(working copy)
+++ xapt/xapt	(working copy)
@@ -203,6 +203,27 @@
 $config_str .= " -o Dir::State::Status=${dpkgdir}status";
 $config_str .= " -o Dir::Cache=${dir}";
 
+# use dpkg --print-foreign-architectures dpkg >= 1.16.2
+my $cmd = 'dpkg-query -W -f \'${Version}\' dpkg';
+$installed = `$cmd 2>/dev/null`;
+my $res = system ("dpkg --compare-versions $installed '>=' 1.16.2");
+$res >>= 8;
+if (($res == 0) and (not defined $multiarch)) {
+	$res = system("dpkg --print-foreign-architectures | grep $arch > /dev/null");
+	$res >>= 8;
+	if ($res == 0) {
+		$cmd = 'dpkg-query -W -f \'${Version}\' dpkg-cross';
+		$installed = `$cmd 2>/dev/null`;
+		$res = system ("dpkg --compare-versions $installed '>=' $minver");
+		$res >>= 8;
+		if ($res != 0) {
+			die ("Unsupported combination of old dpkg-cross and new dpkg!\n");
+		}
+		$multiarch++;
+		warn ("Warning: Multi-Arch support has been enabled.\n");
+	}
+}
+
 print "apt-get $config_str update\n";
 system ("apt-get $config_str update 2>/dev/null");
 my $str = join (" ", @files);
@@ -256,7 +277,7 @@
 	@list = grep(/\.deb$/, readdir DEBS);
 	closedir (DEBS);
 }
-system ("dpkg -i ${dir}output/*.deb")
+system ("dpkg -i ${dir}output/*${arch}-cross*.deb")
 	if ((scalar @list > 0) and (not defined $build) and ($host ne $arch));
 
 system ("rm -rf ${dir}*") if (not defined $preserve);

Attachment: pgp8JcdxiYijb.pgp
Description: PGP signature

Reply via email to