SPECS: builder, repackage.sh - add --show-bcond-args to builder to...

glen glen at pld-linux.org
Mon Nov 20 09:36:50 CET 2006


Author: glen                         Date: Mon Nov 20 08:36:50 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- add --show-bcond-args to builder to work with repackage.sh script

---- Files affected:
SPECS:
   builder (1.465 -> 1.466) , repackage.sh (1.11 -> 1.12) 

---- Diffs:

================================================================
Index: SPECS/builder
diff -u SPECS/builder:1.465 SPECS/builder:1.466
--- SPECS/builder:1.465	Mon Nov 20 01:49:12 2006
+++ SPECS/builder	Mon Nov 20 09:36:44 2006
@@ -302,6 +302,9 @@
                     - don't apply <patchnumber>
 --show-bconds       - show available conditional builds, which can be used
                     - with --with and/or --without switches.
+--show-bcond-args   - show active bconds, from ~/.bcondrc. this is used by
+                      ./repackage.sh script. in other words, the output is
+                      parseable by scripts.
 --with/--without <feature>
                     - conditional build package depending on %_with_<feature>/
                       %_without_<feature> macro switch.  You may now use
@@ -1944,6 +1947,10 @@
 			COMMAND="show_bconds"
 			shift
 			;;
+		--show-bcond-args)
+			COMMAND="show_bcond_args"
+			shift
+			;;
 		--nodeps)
 			shift
 			RPMOPTS="${RPMOPTS} --nodeps"
@@ -2000,6 +2007,15 @@
 			parse_spec
 			set_bconds_values
 			display_bconds
+		fi
+		;;
+	"show_bcond_args")
+		init_builder
+		if [ -n "$SPECFILE" ]; then
+			get_spec > /dev/null
+			parse_spec
+			set_bconds_values
+			echo "$BCOND"
 		fi
 		;;
 	"build" | "build-binary" | "build-source" | "build-prep" )

================================================================
Index: SPECS/repackage.sh
diff -u SPECS/repackage.sh:1.11 SPECS/repackage.sh:1.12
--- SPECS/repackage.sh:1.11	Wed Nov  1 18:44:10 2006
+++ SPECS/repackage.sh	Mon Nov 20 09:36:44 2006
@@ -22,11 +22,7 @@
 	TARGET="$tmp"
 fi
 
-BCONDS=$(./builder --show-bconds $specfile)
-# ignore output from older builders whose output is not compatible.
-if [ "$(echo "$BCONDS" | wc -l)" -gt 1 ]; then
-	BCONDS=""
-fi
+BCONDS=$(./builder --show-bcond-args $specfile)
 
 # just create the rpm's if -bb is somewhere in the args
 if [[ *$@* != *-bb* ]]; then
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/builder?r1=1.465&r2=1.466&f=u
    http://cvs.pld-linux.org/SPECS/repackage.sh?r1=1.11&r2=1.12&f=u



More information about the pld-cvs-commit mailing list