From 57d86eac981ce951c45890854752d62c6e2b2749 Mon Sep 17 00:00:00 2001 From: Paul Varner Date: Wed, 12 Oct 2011 11:34:47 -0500 Subject: [PATCH] Fix revdep-rebuiild to exit correctly with correct error code when emerge fails. Bug 351054 --- bin/revdep-rebuild.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/revdep-rebuild.sh b/bin/revdep-rebuild.sh index abeed6b..538e101 100755 --- a/bin/revdep-rebuild.sh +++ b/bin/revdep-rebuild.sh @@ -18,7 +18,7 @@ unset GREP_OPTIONS # Readonly variables: declare -r APP_NAME="revdep-rebuild" # # The name of this application -declare -r VERSION="svn" +declare -r VERSION="vcs" declare -r OIFS="$IFS" # Save the IFS declare -r ENV_FILE=0_env.rr # Contains environment variables declare -r FILES_FILE=1_files.rr # Contains a list of files to search @@ -1151,7 +1151,8 @@ rebuild() { ## # Finish up cleanup() { - if [[ (( $(<"$STATUS_FILE") != 0 )) && ! is_real_merge ]]; then + EMERGE_STATUS=$(<"$STATUS_FILE") + if [[ (( $EMERGE_STATUS != 0 )) && is_real_merge ]]; then ewarn ewarn "$APP_NAME failed to emerge all packages." ewarn 'you have the following choices:' -- 2.26.2