aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2007-07-25 17:12:22 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2007-07-25 17:12:22 +0000
commit5f2dfb20a07f6ab67dfbd8d2dd4445de6ed58be8 (patch)
tree94464bba7794c3d2f71fabf41076bc6aa07e5429
parent27b3f01f6871dfb376d8e01c3ef4aab8e9234f32 (diff)
downloadrpm-setup-5f2dfb20a07f6ab67dfbd8d2dd4445de6ed58be8.tar
rpm-setup-5f2dfb20a07f6ab67dfbd8d2dd4445de6ed58be8.tar.gz
rpm-setup-5f2dfb20a07f6ab67dfbd8d2dd4445de6ed58be8.tar.bz2
rpm-setup-5f2dfb20a07f6ab67dfbd8d2dd4445de6ed58be8.tar.xz
rpm-setup-5f2dfb20a07f6ab67dfbd8d2dd4445de6ed58be8.zip
- fix #31973 (Impossible to exclude single files from autoreq/autoprov)
-rwxr-xr-xfilter.sh17
-rw-r--r--macros.in4
2 files changed, 12 insertions, 9 deletions
diff --git a/filter.sh b/filter.sh
index 4233265..0ecea90 100755
--- a/filter.sh
+++ b/filter.sh
@@ -11,16 +11,19 @@
#---------------------------------------------------------------
GREP_ARG="$1"
-PROG="$2"
-shift 2
+FILE_GREP_ARG="$2"
+PROG="$3"
+shift 3
+
+GREP_PROG="cat"
+FILE_GREP_PROG="cat"
# use ' ' to signify no arg as rpm filter empty strings from
# command line :(
-if [ "$GREP_ARG" != ' ' ] ;then
- $PROG "$@" | grep -v "$GREP_ARG"
-else
- $PROG "$@"
-fi
+[ "$GREP_ARG" = ' ' ] || GREP_PROG="grep -v $GREP_ARG"
+[ "$FILE_GREP_ARG" = ' ' ] || FILE_GREP_PROG="grep -v $FILE_GREP_ARG"
+
+$FILE_GREP_PROG | $PROG "$@" | $GREP_PROG
exit 0
diff --git a/macros.in b/macros.in
index 5605dec..1deb33d 100644
--- a/macros.in
+++ b/macros.in
@@ -148,8 +148,8 @@
# Use internal dependency generator rather than external helpers?
%_use_internal_dependency_generator 0
-%__find_provides @RPMVENDORDIR@/filter.sh '%{?_provides_exceptions:%{_provides_exceptions}}%{!?_provides_exceptions: }' @RPMVENDORDIR@/find-provides
-%__find_requires @RPMVENDORDIR@/filter.sh '%{?_requires_exceptions:%{_requires_exceptions}}%{!?_requires_exceptions: }' @RPMVENDORDIR@/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}}
+%__find_provides @RPMVENDORDIR@/filter.sh '%{?_provides_exceptions:%{_provides_exceptions}}%{!?_provides_exceptions: }' '%{?_exclude_files_from_autoprov:%{?buildroot:%{buildroot}}%{_exclude_files_from_autoprov}}%{!?_exclude_files_from_autoprov: }' @RPMVENDORDIR@/find-provides
+%__find_requires @RPMVENDORDIR@/filter.sh '%{?_requires_exceptions:%{_requires_exceptions}}%{!?_requires_exceptions: }' '%{?_exclude_files_from_autoreq:%{?buildroot:%{buildroot}}%{_exclude_files_from_autoreq}}%{!?_exclude_files_from_autoreq: }' @RPMVENDORDIR@/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}}
%find_lang @RPMVENDORDIR@/find-lang.pl %{buildroot}