Author: glen                         Date: Sat Oct 15 13:17:30 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- parse optional deps

---- Files affected:
SPECS:
   pearize.sh (1.24 -> 1.25) 

---- Diffs:

================================================================
Index: SPECS/pearize.sh
diff -u SPECS/pearize.sh:1.24 SPECS/pearize.sh:1.25
--- SPECS/pearize.sh:1.24       Thu Oct  6 19:37:45 2005
+++ SPECS/pearize.sh    Sat Oct 15 15:17:25 2005
@@ -98,6 +98,19 @@
        done
 fi
 
+# parse optional deps
+optional=$(grep '^Optional:' $template || :)
+if [ -n "$optional" ]; then
+       echo "$optional" | while read tag dep; do
+               for req in $dep; do
+                       m=$(grep "^%define.*_noautoreq" $spec | fgrep -o "$req" 
|| :)
+                       if [ -z "$m" ]; then
+                               sed -i -e "/^%define.*_noautoreq/s/$/ $req/" 
$spec
+                       fi
+               done
+       done
+fi
+
 # parse state
 state=$(awk '/^State:/{print $2}' $template)
 sed -i -e "/^%define.*_status/{
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/pearize.sh?r1=1.24&r2=1.25&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to