summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaul Varner <fuzzyray@gentoo.org>2012-02-16 11:34:37 -0600
committerPaul Varner <fuzzyray@gentoo.org>2012-02-16 11:34:37 -0600
commit3e51df74595c535656ef9f38bf7a577a4f64d0f5 (patch)
treeb379ad10e9bc2e3a97bd83db25f130765d2a3966 /bin
parentMerge branch 'gentoolkit' of git+ssh://git.overlays.gentoo.org/proj/gentoolki... (diff)
downloadgentoolkit-3e51df74595c535656ef9f38bf7a577a4f64d0f5.tar.gz
gentoolkit-3e51df74595c535656ef9f38bf7a577a4f64d0f5.tar.bz2
gentoolkit-3e51df74595c535656ef9f38bf7a577a4f64d0f5.zip
Fix revdep-rebuild.sh to properly honor emerge return codes.
This should fix bugs 326923, 351054, and 404065
Diffstat (limited to 'bin')
-rwxr-xr-xbin/revdep-rebuild.sh70
1 files changed, 36 insertions, 34 deletions
diff --git a/bin/revdep-rebuild.sh b/bin/revdep-rebuild.sh
index 50bc070..1d27d63 100755
--- a/bin/revdep-rebuild.sh
+++ b/bin/revdep-rebuild.sh
@@ -1152,42 +1152,44 @@ rebuild() {
# Finish up
cleanup() {
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:'
- einfo "- If emerge failed during the build, fix the problems and re-run $APP_NAME."
- einfo '- Use /etc/portage/package.keywords to unmask a newer version of the package.'
- einfo " (and remove $ORDER_FILE to be evaluated again)"
- einfo '- Modify the above emerge command and run it manually.'
- einfo '- Compile or unmerge unsatisfied packages manually,'
- einfo ' remove temporary files, and try again.'
- einfo ' (you can edit package/ebuild list first)'
- einfo
- einfo 'To remove temporary files, please run:'
- einfo "rm ${WORKING_DIR}/*.rr"
- show_unowned_files
- exit $EMERGE_STATUS
- elif is_real_merge; then
- trap_cmd() {
- eerror "terminated. Please remove the temporary files manually:"
- eerror "rm ${WORKING_DIR}/*.rr"
- exit 1
- }
- [[ "${SKIP_LIST[@]}" != "" ]] && list_skipped_packages
- trap trap_cmd SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM
- einfo 'Build finished correctly. Removing temporary files...'
- einfo
- einfo 'You can re-run revdep-rebuild to verify that all libraries and binaries'
- einfo 'are fixed. Possible reasons for remaining inconsistencies include:'
- einfo ' orphaned files'
- einfo ' deep dependencies'
- einfo " packages installed outside of portage's control"
- einfo ' specially-evaluated libraries'
- if [[ -r "$OWNERS_FILE" && -s "$OWNERS_FILE" ]]; then
+ if is_real_merge; then
+ if [[ (( $EMERGE_STATUS != 0 )) ]]; then
+ ewarn
+ ewarn "$APP_NAME failed to emerge all packages."
+ ewarn 'you have the following choices:'
+ einfo "- If emerge failed during the build, fix the problems and re-run $APP_NAME."
+ einfo '- Use /etc/portage/package.keywords to unmask a newer version of the package.'
+ einfo " (and remove $ORDER_FILE to be evaluated again)"
+ einfo '- Modify the above emerge command and run it manually.'
+ einfo '- Compile or unmerge unsatisfied packages manually,'
+ einfo ' remove temporary files, and try again.'
+ einfo ' (you can edit package/ebuild list first)'
+ einfo
+ einfo 'To remove temporary files, please run:'
+ einfo "rm ${WORKING_DIR}/*.rr"
show_unowned_files
+ exit $EMERGE_STATUS
+ else
+ trap_cmd() {
+ eerror "terminated. Please remove the temporary files manually:"
+ eerror "rm ${WORKING_DIR}/*.rr"
+ exit 1
+ }
+ [[ "${SKIP_LIST[@]}" != "" ]] && list_skipped_packages
+ trap trap_cmd SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM
+ einfo 'Build finished correctly. Removing temporary files...'
+ einfo
+ einfo 'You can re-run revdep-rebuild to verify that all libraries and binaries'
+ einfo 'are fixed. Possible reasons for remaining inconsistencies include:'
+ einfo ' orphaned files'
+ einfo ' deep dependencies'
+ einfo " packages installed outside of portage's control"
+ einfo ' specially-evaluated libraries'
+ if [[ -r "$OWNERS_FILE" && -s "$OWNERS_FILE" ]]; then
+ show_unowned_files
+ fi
+ [[ $KEEP_TEMP ]] || rm -f "${FILES[@]}"
fi
- [[ $KEEP_TEMP ]] || rm -f "${FILES[@]}"
else
einfo 'Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.'
fi