Package: devscripts
Version: 2.11.1
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: precise origin-ubuntu ubuntu-patch

Hi folks,

I've been happily using mk-build-deps for a while now since it was first
pointed out to me.  But the packages that it generates can only be used for
native package builds, not for cross-package builds using multiarch.  The
attach patch addresses this by causing mk-build-deps to always treat any
--arch argument as authoritative.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
From 7fb56cd4408858f336c955f3f93708eb933ed8d8 Mon Sep 17 00:00:00 2001
From: Steve Langasek <steve.langa...@canonical.com>
Date: Sat, 5 Nov 2011 11:15:26 -0700
Subject: [PATCH] Always make mk-build-deps packages arch-dependent when
 --arch is passed

When an --arch argument is passed to mk-build-deps, we should output an
architecture-dependent package even if there are no architecture-dependent
build-dependencies, so that cross-installing the package in a multiarch
environment does the right thing.
---
 scripts/mk-build-deps.pl |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/mk-build-deps.pl b/scripts/mk-build-deps.pl
index 61ebd3e..678ea47 100755
--- a/scripts/mk-build-deps.pl
+++ b/scripts/mk-build-deps.pl
@@ -321,9 +321,10 @@ sub build_equiv
     if ($opts->{depends} =~ /\[|\]/) {
 	$arch = 'any';
 
-	if (defined $opt_arch) {
-	    $args = "--arch=$opt_arch ";
-	}
+    }
+    if (defined $opt_arch) {
+	$args = "--arch=$opt_arch ";
+	$arch = $opt_arch;
     }
 
     open EQUIVS, "| equivs-build $args-"
-- 
1.7.5.4

Attachment: signature.asc
Description: Digital signature

Reply via email to