SPECS: builder - check for EA before filling BR
glen
glen at pld-linux.org
Sat Mar 3 16:41:06 CET 2007
Author: glen Date: Sat Mar 3 15:41:06 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- check for EA before filling BR
---- Files affected:
SPECS:
builder (1.483 -> 1.484)
---- Diffs:
================================================================
Index: SPECS/builder
diff -u SPECS/builder:1.483 SPECS/builder:1.484
--- SPECS/builder:1.483 Sat Mar 3 15:52:01 2007
+++ SPECS/builder Sat Mar 3 16:41:01 2007
@@ -200,7 +200,7 @@
[-Tvs|--tag-version-stable] [-Ts|--tag-stable] [-Tv|--tag-version]
[{-Tp|--tag-prefix} <prefix>] [{-tt|--test-tag}]
[-nu|--no-urls] [-v|--verbose] [--opts <rpm opts>] [--short-circuit]
-[--show-bconds] [--with/--without <feature>] [--define <macro> <value>]
+[--show-bconds] [--with/--without <feature>] [--define <macro> <value>]
<package>[.spec][:cvstag]
-5, --update-md5 - update md5 comments in spec, implies -nd -ncs
@@ -1175,6 +1175,18 @@
}
+# this function should exit early if package can't be built for this arch
+# this avoids unneccessary BR filling.
+check_buildarch() {
+ local out ret
+ out=$($RPMBUILD --short-circuit -bp --define 'prep exit 0' --nodeps $QUIET $RPMOPTS $RPMBUILDOPTS $BCOND $TARGET_SWITCH $SPECFILE 2>&1)
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ echo >&2 "$out"
+ exit $ret
+ fi
+}
+
build_package()
{
@@ -2092,6 +2104,7 @@
set_bconds_values
display_bconds
display_branches
+ check_buildarch
fetch_build_requires
if [ "$INTEGER_RELEASE" = "yes" ]; then
echo "Checking release $PACKAGE_RELEASE..."
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/builder?r1=1.483&r2=1.484&f=u
More information about the pld-cvs-commit
mailing list