diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-03-03 18:55:30 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-03-03 18:55:30 +0000 |
commit | bb8c6e58795e9471e386504c193e3afb945ca08a (patch) | |
tree | 797d342db9657abe6b778ff0b0b3ebcc9295a9ca | |
parent | 6c9f3ce49b9ead6fc2417f8d8fa51a2d2bbea89e (diff) | |
download | rpm-setup-bb8c6e58795e9471e386504c193e3afb945ca08a.tar rpm-setup-bb8c6e58795e9471e386504c193e3afb945ca08a.tar.gz rpm-setup-bb8c6e58795e9471e386504c193e3afb945ca08a.tar.bz2 rpm-setup-bb8c6e58795e9471e386504c193e3afb945ca08a.tar.xz rpm-setup-bb8c6e58795e9471e386504c193e3afb945ca08a.zip |
test return value of provide scripts and exit with 1 in case of error
-rwxr-xr-x | find-provides.in | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/find-provides.in b/find-provides.in index 5476964..bed7c13 100755 --- a/find-provides.in +++ b/find-provides.in @@ -47,45 +47,53 @@ done | sort -u # # --- Perl modules. [ -x @RPMVENDORDIR@/perl.prov ] && - echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/perl.prov | grep 'perl([[:upper:]]' | sort -u + echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/perl.prov | grep 'perl([[:upper:]]' | sort -u \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/perl.prov failed' >&2 && exit 1 # # --- Python modules. [ -x @RPMVENDORDIR@/pythoneggs.py -a -n "$filelist" ] && - echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/pythoneggs.py --provides | sort -u + echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/pythoneggs.py --provides | sort -u \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/pythoneggs.py failed' >&2 && exit 1 # # --- Tcl modules. [ -x @RPMVENDORDIR@/tcl.prov -a -n "$tcllist" ] && - echo "$tcllist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/tcl.prov | sort -u + echo "$tcllist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/tcl.prov | sort -u \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/tcl.prov failed' >&2 && exit 1 # # --- Php modules. [ -x @RPMVENDORDIR@/php.prov ] && - echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/php.prov | sort -u + echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/php.prov | sort -u \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/php.prov failed' >&2 && exit 1 # # --- Kernel modules. [ -x @RPMVENDORDIR@/kmod.prov ] && - echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/kmod.prov | sort -u + echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/kmod.prov | sort -u \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/kmod.prov failed' >&2 && exit 1 # # --- Pkgconfig deps [ -x @RPMVENDORDIR@/pkgconfigdeps.sh ] && - echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/pkgconfigdeps.sh -P | sort -u + echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/pkgconfigdeps.sh -P | 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 -P | sort -u + echo "$filelist" | tr '[:blank:]' \\n | @RPMLIBDIR@/libtooldeps.sh -P | 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 --provides | sort -u + echo $rubygemlist | tr '[:blank:]' \\n | @RPMVENDORDIR@/rubygems.rb --provides | sort -u \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/rubygems.rb failed' >&2 && exit 1 # # --- .so files. @@ -99,19 +107,22 @@ done | sort -u # # --- mono provides if [ -x /usr/bin/mono-find-provides ]; then -echo $filelist | tr '[:blank:]' '\n' | /usr/bin/mono-find-provides +echo $filelist | tr '[:blank:]' '\n' | /usr/bin/mono-find-provides \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: /usr/bin/mono-find-provides failed' >&2 && exit 1 fi # # --- haskell provides if [ -x /usr/bin/haskell-find-provides ]; then -echo $filelist | tr '[:blank:]' '\n' | /usr/bin/haskell-find-provides +echo $filelist | tr '[:blank:]' '\n' | /usr/bin/haskell-find-provides \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: /usr/bin/haskell-find-provides failed' >&2 && exit 1 fi # # --- gstreamer modules. [ -x @RPMVENDORDIR@/gstreamer.prov ] && - echo "$solist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/gstreamer.prov | sort -u + echo "$solist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/gstreamer.prov | sort -u \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/gstreamer.prov failed' >&2 && exit 1 exit 0 |