From owner-svn-src-user@FreeBSD.ORG Wed Oct 19 01:23:13 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D977F106566C; Wed, 19 Oct 2011 01:23:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9F6D8FC0A; Wed, 19 Oct 2011 01:23:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9J1NDoi098227; Wed, 19 Oct 2011 01:23:13 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9J1NDCF098225; Wed, 19 Oct 2011 01:23:13 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201110190123.p9J1NDCF098225@svn.freebsd.org> From: Doug Barton Date: Wed, 19 Oct 2011 01:23:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226524 - user/dougb/portmaster X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 01:23:13 -0000 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'