]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- check for EA before filling BR
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 3 Mar 2007 15:41:01 +0000 (15:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    builder.sh -> 1.484

builder.sh

index 132e61cefff8eb972bf3742075795d0bddf1e305..ea9821371f0bc31759d1f3fcb0cf05421c219595 100644 (file)
@@ -200,7 +200,7 @@ Usage: builder [-D|--debug] [-V|--version] [-a|--as_anon] [-b|-ba|--build]
 [-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 @@ branch_files()
 }
 
 
+# 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 @@ case "$COMMAND" in
                        set_bconds_values
                        display_bconds
                        display_branches
+                       check_buildarch
                        fetch_build_requires
                        if [ "$INTEGER_RELEASE" = "yes" ]; then
                                echo "Checking release $PACKAGE_RELEASE..."
This page took 0.055676 seconds and 4 git commands to generate.