aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-03-03 19:07:08 +0000
committerNicolas Vigier <boklm@mageia.org>2011-03-03 19:07:08 +0000
commit044584e47d9a0d83e1b98e7531ccd62fa79004ab (patch)
tree3f9c83782cabd586de6f7e94b82dc2a376b2c3c1
parentbb8c6e58795e9471e386504c193e3afb945ca08a (diff)
downloadrpm-setup-044584e47d9a0d83e1b98e7531ccd62fa79004ab.tar
rpm-setup-044584e47d9a0d83e1b98e7531ccd62fa79004ab.tar.gz
rpm-setup-044584e47d9a0d83e1b98e7531ccd62fa79004ab.tar.bz2
rpm-setup-044584e47d9a0d83e1b98e7531ccd62fa79004ab.tar.xz
rpm-setup-044584e47d9a0d83e1b98e7531ccd62fa79004ab.zip
test return value of require scripts and exit with 1 in case of error
-rwxr-xr-xfind-requires.in30
1 files changed, 20 insertions, 10 deletions
diff --git a/find-requires.in b/find-requires.in
index b7f70c9..0750da7 100755
--- a/find-requires.in
+++ b/find-requires.in
@@ -183,10 +183,12 @@ perlmeta=$( echo $filelist | tr '[:blank:]' \\n | egrep 'doc/[^/]+/META.(yml|jso
if [ -n "$perlmeta" ]
then
[ -x @RPMVENDORDIR@/perl.req-from-meta ] && \
- @RPMVENDORDIR@/perl.req-from-meta $perlmeta
+ @RPMVENDORDIR@/perl.req-from-meta $perlmeta \
+ && test ${PIPESTATUS[0]} -ne 0 && echo 'error: @RPMVENDORDIR@/perl.req-from-meta failed' >&2 && exit 1
else
[ -x @RPMVENDORDIR@/perl.req -a -n "$perllist" ] && \
- echo $perllist | tr '[:blank:]' \\n | @RPMVENDORDIR@/perl.req | grep 'perl([[:upper:]]' | egrep -v '^perl\((Be|FreeBSD|HPUX|Mac|MSDOS|MVS|OS2|Riscos|SGI|Solaris|VMS|Win32|WinNT)::' | sort -u
+ echo $perllist | tr '[:blank:]' \\n | @RPMVENDORDIR@/perl.req | grep 'perl([[:upper:]]' | egrep -v '^perl\((Be|FreeBSD|HPUX|Mac|MSDOS|MVS|OS2|Riscos|SGI|Solaris|VMS|Win32|WinNT)::' | sort -u \
+ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/perl.req failed' >&2 && exit 1
fi
#
@@ -208,36 +210,42 @@ fi
#
# --- Python modules.
[ -x @RPMVENDORDIR@/pythoneggs.py -a -n "$filelist" ] && \
- echo $filelist | tr '[:blank:]' \\n | @RPMVENDORDIR@/pythoneggs.py --requires | sort -u
+ echo $filelist | tr '[:blank:]' \\n | @RPMVENDORDIR@/pythoneggs.py --requires | sort -u \
+ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/pythoneggs.py failed' >&2 && exit 1
#
# --- Tcl modules.
[ -x @RPMVENDORDIR@/tcl.req -a -n "$tcllist" ] && \
- echo $tcllist | tr '[:blank:]' \\n | @RPMVENDORDIR@/tcl.req | sort -u
+ echo $tcllist | tr '[:blank:]' \\n | @RPMVENDORDIR@/tcl.req | sort -u \
+ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/tcl.req failed' >&2 && exit 1
#
# --- Php modules.
[ -x @RPMVENDORDIR@/php.req -a -n "$phplist" ] && \
- echo $phplist | tr '[:blank:]' \\n | @RPMVENDORDIR@/php.req | sort -u
+ echo $phplist | tr '[:blank:]' \\n | @RPMVENDORDIR@/php.req | sort -u \
+ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/php.req failed' >&2 && exit 1
#
# --- Pkgconfig deps
[ -x @RPMVENDORDIR@/pkgconfigdeps.sh ] &&
- echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/pkgconfigdeps.sh -R | sort -u
+ echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/pkgconfigdeps.sh -R | sort -u \
+ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/pkgconfigdeps.sh failed' >&2 && exit 1
if [ -n "$LIBTOOLDEP" ]; then
#
# --- libtooldep deps
[ -x @RPMLIBDIR@/libtooldeps.sh ] &&
- echo "$filelist" | tr '[:blank:]' \\n | @RPMLIBDIR@/libtooldeps.sh -R | sort -u
+ echo "$filelist" | tr '[:blank:]' \\n | @RPMLIBDIR@/libtooldeps.sh -R | sort -u \
+ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/libtooldeps.sh failed' >&2 && exit 1
fi
#
# --- Ruby gems
[ -x @RPMVENDORDIR@/rubygems.rb -a -n "$rubygemlist" ] &&
- echo $rubygemlist | tr '[:blank:]' \\n | @RPMVENDORDIR@/rubygems.rb --requires | sort -u
+ echo $rubygemlist | tr '[:blank:]' \\n | @RPMVENDORDIR@/rubygems.rb --requires | sort -u \
+ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/rubygems.rb failed' >&2 && exit 1
#
# --- .so files.
@@ -276,13 +284,15 @@ echo $filelist | tr '[:blank:]' '\n' | grep -q '/multiarch-.*-linux/' && echo m
#
# --- mono requires
if [ -x /usr/bin/mono-find-requires ]; then
-echo $filelist | tr '[:blank:]' '\n' | /usr/bin/mono-find-requires
+echo $filelist | tr '[:blank:]' '\n' | /usr/bin/mono-find-requires \
+ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: /usr/bin/mono-find-requires failed' >&2 && exit 1
fi
#
# haskell requires
if [ -x /usr/bin/haskell-find-requires ]; then
-echo $filelist | tr '[:blank:]' '\n' | /usr/bin/haskell-find-requires
+echo $filelist | tr '[:blank:]' '\n' | /usr/bin/haskell-find-requires \
+ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: /usr/bin/haskell-find-requires failed' >&2 && exit 1
fi