Skip to contentSkip to conversation

Don't force deb architecture on universal packages

PATCH Superseded Grzegorz Nosek 1 participant 1 message Mar 23, 2012 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't force deb architecture on universal packages

$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.

---

Note: this is based on 3.2 as that's what I'm currently using. I'll clean the two-level if and rebase onto whatever is required when the general idea is accepted.

Best regards,
Grzegorz Nosek

 scripts/package/builddeb |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
scripts/package/builddeb +4 -2
index 3c6c0b1..ef71b80 100644
@@ -57,8 +57,10 @@ create_package() {
 	if [ -n "$KBUILD_DEBARCH" ] ; then
 		debarch="$KBUILD_DEBARCH"
 	fi
-	if [ -n "$debarch" ] ; then
-		forcearch="-DArchitecture=$debarch"
+	if [ -n "$debarch" ]; then
+		if ! grep -qFx "Architecture: all" debian/control ; then
+			forcearch="-DArchitecture=$debarch"
+		fi
 	fi
 
 	# Create the package
Signature · 1 line
1.7.2.3