[PATCH v2] Don't force deb architecture on universal packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

$debarch is basically always set so the Architecture field from
debian/control is ignored. While we don't really care for most packages
(they have Architecture: any or some specific $arch), this breaks the
firmware package as it becomes an arch-dependent .deb, ignoring its
Architecture: all entry.

It's apparently broken by 10f26fa64200095af0e5d80a980e47877865e4b7.

Signed-off-by: Grzegorz Nosek <root@xxxxxxxxxxxxxx>
Note: this is based on 3.2 as that's what I'm currently using. I'll
rebase onto whatever is required when the general idea is accepted.

(earlier version was completely bogus, sorry for that)

Best regards,
 Grzegorz Nosek

 scripts/package/builddeb |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 3c6c0b1..43476c5 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -57,8 +57,11 @@ create_package() {
 	if [ -n "$KBUILD_DEBARCH" ] ; then
-	if [ -n "$debarch" ] ; then
-		forcearch="-DArchitecture=$debarch"
+	if [ -n "$debarch" ]; then
+		pkgarch=`sed -n "/^Package: $pname\$/,/^\$/s/^Architecture: //p" debian/control`
+		if [ "$pkgarch" != "all" ]; then
+			forcearch="-DArchitecture=$debarch"
+		fi

 	# Create the package
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux