]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- don't lookup bcond_*'s in changelog rpm-4_0-6
authormis <mis@pld-linux.org>
Mon, 11 Dec 2000 15:03:07 +0000 (15:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-find-spec-bcond -> 1.2

rpm-find-spec-bcond

index 56466e9ad4636cee73a1674886a5080244f24940..0db70f80124e83581fad66eb275080ec93ceddbd 100644 (file)
@@ -21,10 +21,12 @@ if [ ! -f $SPEC ]; then
     exit 1
 fi
 
-bconds=`awk -F"\n" '/bcond_[_a-z0-9]+/ {
-               match($0, /bcond_[_a-z0-9]+/);
-              print substr($0, RSTART, RLENGTH)                       
-           }' $SPEC | sort -u`
+bconds=`awk -F"\n" 'BEGIN { chlog=0 }
+               /^%changelog/ { chlog=1 }
+               /bcond_[_a-z0-9]+/ && chlog == 0 {
+                       match($0, /bcond_[_a-z0-9]+/);
+                       print substr($0, RSTART, RLENGTH)                       
+               }' $SPEC | sort -u`
 
 for c in $bconds; do
     echo -n "$c"
@@ -45,7 +47,7 @@ for bcond in $bconds; do
                      } else if (match(\\$0, /$bcond[\t ]+1[\t ]*$/)) {
                         val = 1
                      } else {
-                        print \"could determine $bcond value from \", \\$0
+                        print \"couldn't determine $bcond value from \", \\$0
                      }
                   } END { print val }" $SPEC`;
 
This page took 0.030916 seconds and 4 git commands to generate.