svn commit: r226524 - user/dougb/portmaster
Doug Barton
dougb at FreeBSD.org
Wed Oct 19 01:23:13 UTC 2011
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'
More information about the svn-src-user
mailing list