From 3c78b7a354e9e4168efb30566180be7839d9a4a0 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 8 Sep 2014 12:15:51 +0200 Subject: sync (8/8): Handle broken pkgconfig files better, rhbz#484970 (Lubomir Rintel) --- pkgconfigdeps.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgconfigdeps.sh b/pkgconfigdeps.sh index 08713be..da6e9aa 100755 --- a/pkgconfigdeps.sh +++ b/pkgconfigdeps.sh @@ -28,7 +28,9 @@ case $1 in # We have a dependency. Make a note that we need the pkgconfig # tool for this package. test -z "$v" && test -n "$r" && echo "Error with pkgconfig($n)" >&2 && exit 1 - echo "pkgconfig($n)" "$r" "$v" + echo -n "pkgconfig($n) " + [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v" + echo done test ${PIPESTATUS[0]} -ne 0 && echo "$pkgconfig returned an error" >&2 && exit 1 # The dependency on the pkgconfig package itself. @@ -44,7 +46,10 @@ case $1 in export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" $pkgconfig --print-errors --print-requires --print-requires-private $filename | while read n r v ; do test -z "$v" && test -n "$r" && echo "Error with pkgconfig($n)" >&2 && exit 1 - echo "pkgconfig($n)" "$r" "$v" + [ -n "$n" ] || continue + echo -n "pkgconfig($n) " + [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v" + echo done test ${PIPESTATUS[0]} -ne 0 && echo "$pkgconfig returned an error" >&2 && exit 1 esac -- cgit v1.2.1