SPECS: builder - try spec file name too when parsing bcondrc (usef...

sparky sparky at pld-linux.org
Fri Oct 21 20:53:59 CEST 2005


Author: sparky                       Date: Fri Oct 21 18:53:59 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- try spec file name too when parsing bcondrc (useful for kernel.spec)

---- Files affected:
SPECS:
   builder (1.339 -> 1.340) 

---- Diffs:

================================================================
Index: SPECS/builder
diff -u SPECS/builder:1.339 SPECS/builder:1.340
--- SPECS/builder:1.339	Sun Oct 16 15:37:31 2005
+++ SPECS/builder	Fri Oct 21 20:53:54 2005
@@ -1001,6 +1001,7 @@
 		# This takes package name, first defined in spec.
 		# so consider that when defining flags for package.
 		PN=`$RPM -q --qf '%{NAME}\n' --specfile $SPECFILE | head -n 1`
+		SN=${SPECFILE%%\.spec}
 		AVAIL=`$RPMBUILD --bcond $SPECFILE`
 
 		BCONDRC=$HOME/.bcondrc
@@ -1011,7 +1012,7 @@
 			[[ "$pkg" == \#* ]] && continue
 
 			# any package or current package?
-			if [ "$pkg" = "*" ] || [ "$pkg" = "$PN" ]; then
+			if [ "$pkg" = "*" ] || [ "$pkg" = "$PN" ] || [ "$pkg" = "$SN" ]; then
 				for flag in $flags; do
 					opt=${flag#[+-]}
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/builder?r1=1.339&r2=1.340&f=u




More information about the pld-cvs-commit mailing list