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

Bug#203097: A better patch



Here's a patch I like better.  It implements calling debian/rules
build-arch if appropriate, but falls back to debian/rules build if
that target isn't present.  (According to policy, debian/rules does
have to return an exit code of 2 if it doesn't provide build-arch --
and this is automatically provided by make anyway.)  I've tested this
patch with packages with and without build-arch provided.
-- 
Daniel Schepler              "Please don't disillusion me.  I
schepler@math.berkeley.edu    haven't had breakfast yet."
                                 -- Orson Scott Card
--- dpkg-1.10.10/scripts/dpkg-buildpackage.sh~	2002-05-24 19:57:15.000000000 -0700
+++ dpkg-1.10.10/scripts/dpkg-buildpackage.sh	2003-08-31 03:28:12.000000000 -0700
@@ -2,7 +2,7 @@
 
 set -e
 
-version="1.3.0"; # This line modified by Makefile
+version="1.10.10"; # This line modified by Makefile
 
 progname="`basename \"$0\"`"
 usageversion () {
@@ -196,7 +196,12 @@
 	cd ..; withecho dpkg-source $passopts $diffignore $tarignore -b "$dirn"; cd "$dirn"
 fi
 if [ x$sourceonly = x ]; then
-	withecho debian/rules build 
+	if [ x$binaryonly = x-B ]; then
+		withecho debian/rules build-arch ||
+			( [ $? = 2 ] && withecho debian/rules build )
+	else
+		withecho debian/rules build 
+	fi
 	withecho $rootcommand debian/rules $binarytarget
 fi
 if [ "$usepause" = "true" ] && \

Reply to: