SPECS: pearize.sh - add _noautoreq if missing and needed
glen
glen at pld-linux.org
Sun Apr 2 15:07:02 CEST 2006
Author: glen Date: Sun Apr 2 13:07:02 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- add _noautoreq if missing and needed
---- Files affected:
SPECS:
pearize.sh (1.37 -> 1.38)
---- Diffs:
================================================================
Index: SPECS/pearize.sh
diff -u SPECS/pearize.sh:1.37 SPECS/pearize.sh:1.38
--- SPECS/pearize.sh:1.37 Sun Apr 2 14:17:46 2006
+++ SPECS/pearize.sh Sun Apr 2 15:06:56 2006
@@ -112,11 +112,23 @@
if [ -n "$optional" ]; then
echo "$optional" | while read tag dep; do
for req in $dep; do
- m=$(grep "^%define.*_noautoreq" $spec | grep -o "$req" || :)
+ echo add dep: $dep
+ set -x
+ m=$(grep "^%define.*_noautoreq" $spec || :)
if [ -z "$m" ]; then
- # FIXME: fails if _noautoreq is not present
- sed -i -e "/^%define.*_noautoreq/s,$, $req," $spec
+ sed -i -e "/^BuildRoot:/{
+ a
+ a# exclude optional dependencies
+ a%define\ \ _noautoreq\ $req
+ }
+ " $spec
+ else
+ m=$(echo "$m" | grep -o "$req" || :)
+ if [ -z "$m" ]; then
+ sed -i -e "/^%define.*_noautoreq/s,$, $req," $spec
+ fi
fi
+ set -
done
done
fi
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/pearize.sh?r1=1.37&r2=1.38&f=u
More information about the pld-cvs-commit
mailing list