severity 168266 wishlist merge 148932 168266 tag 148932 + patch thanks Attached is a patch that gets -B to only run build-arch if it's available. If it exits with exit code 2, debian/rules build is run.
This requires that debian/rules exits with code 2 if build-arch is not a supported target. -- Duncan Findlay
diff -ru dpkg-1.10.9.orig/scripts/dpkg-buildpackage.sh
dpkg-1.10.9/scripts/dpkg-buildpackage.sh
--- dpkg-1.10.9.orig/scripts/dpkg-buildpackage.sh 2002-05-24
22:57:15.000000000 -0400
+++ dpkg-1.10.9/scripts/dpkg-buildpackage.sh 2003-04-06 20:38:48.000000000
-0400
@@ -196,8 +196,20 @@
cd ..; withecho dpkg-source $passopts $diffignore $tarignore -b
"$dirn"; cd "$dirn"
fi
if [ x$sourceonly = x ]; then
- withecho debian/rules build
- withecho $rootcommand debian/rules $binarytarget
+ if [ "$binaryonly" = "-B" ]; then
+ set +e
+ withecho debian/rules build-arch
+ if [ $? = 2 ]; then
+ set -e
+ withecho debian/rules build
+ elif [ $? != 0 ]; then
+ exit $?
+ fi
+ set -e
+ else
+ withecho debian/rules build
+ fi
+ withecho $rootcommand debian/rules $binarytarget
fi
if [ "$usepause" = "true" ] && \
[ "$signchanges" != ":" -o \( -z "$binaryonly" -a "$signsource" != ":" \)
] ; then
pgploz2XA7lSo.pgp
Description: PGP signature

