Date: Wed, 19 Oct 2011 01:23:13 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r226524 - user/dougb/portmaster Message-ID: <201110190123.p9J1NDCF098225@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Wed Oct 19 01:23:13 2011 New Revision: 226524 URL: http://svn.freebsd.org/changeset/base/226524 Log: In parent_exit() run the code to kill background processes if we're called with a non-zero exit code. That will trigger it (for example) where the user answers no to the confirmation prompt and is either using -D, or the generation of the list of valid distfiles did not complete. Now that there are 3 sites to trip it, use a flag to indicate that it needs to be run to make sure that we don't run it more than once. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Tue Oct 18 22:51:40 2011 (r226523) +++ user/dougb/portmaster/portmaster Wed Oct 19 01:23:13 2011 (r226524) @@ -118,11 +118,11 @@ kill_bad_children () { } parent_exit () { - local files f DISCARD show_list + local need_kbc files f DISCARD show_list - [ -s "$DI_FILES" ] && { grep -q '%%%%%%%%%%%%' $DI_FILES || kill_bad_children; } + [ -s "$DI_FILES" ] && { grep -q '%%%%%%%%%%%%' $DI_FILES || need_kbc=need_kbc_dif; } - [ -n "$FETCH_ONLY" -a -z "$FETCH_ONLY_DONE" ] && kill_bad_children + [ -n "$FETCH_ONLY" -a -z "$FETCH_ONLY_DONE" ] && need_kbc=need_kbc_fo if [ -z "$1" ]; then if [ -n "$PM_URB" -o -n "$PM_FORCE" ]; then @@ -137,8 +137,12 @@ parent_exit () { pm_cd $pbu || fail "Cannot cd to $pbu" pm_rm_s $NB_DELETE fi + else + need_kbc=need_kbc_ec fi + [ -n "$need_kbc" ] && kill_bad_children + [ -n "$pbu" ] && pbu=`find $pbu -type d -empty 2>/dev/null` if [ -d "$pbu" ]; then pm_sv 'Removing empty backup package directory'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110190123.p9J1NDCF098225>