]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- parse optional deps
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 15 Oct 2005 13:17:25 +0000 (13:17 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pearize.sh -> 1.25

pearize.sh

index caa3b831f4550939b197ed18913eff110f3696be..e2642af9e3a7220b80f59c6b6fb1d762ca1ae4e7 100644 (file)
@@ -98,6 +98,19 @@ if [ -n "$conflicts" ]; then
        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/{
This page took 0.034473 seconds and 4 git commands to generate.