Date: Sun, 10 Jun 2012 05:24:24 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r236831 - user/dougb/portmaster Message-ID: <201206100524.q5A5OOYG074810@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Sun Jun 10 05:24:24 2012 New Revision: 236831 URL: http://svn.freebsd.org/changeset/base/236831 Log: Add a test for background clean processes to finish before emptying directories in WRKDIRPREFIX Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sun Jun 10 02:38:51 2012 (r236830) +++ user/dougb/portmaster/portmaster Sun Jun 10 05:24:24 2012 (r236831) @@ -155,8 +155,20 @@ parent_exit () { done if [ -n "$PM_WRKDIRPREFIX" ]; then + count=0 + while : ; do + pgrep -qf 'make clean NOCLEANDEPENDS=ncd' || break + count=$(( $count + 1 )) + if [ $count -eq 1 ]; then + echo "===>>> Waiting for background clean processes to finish" + elif [ $count -eq 10 ]; then + count=0 + fi + sleep 2 + done + pm_v "===>>> Removing empty directories from WRKDIRPREFIX" - find -d $PM_WRKDIRPREFIX -mindepth 1 -type d -empty -delete 2>/dev/null + find $PM_WRKDIRPREFIX -depth -mindepth 1 -type d -empty -delete 2>/dev/null fi case "$DISPLAY_LIST" in @@ -3876,9 +3888,9 @@ if [ -n "$MAKE_PACKAGE" ]; then fi if [ -z "$use_package" -a -z "$DONT_POST_CLEAN" ]; then - pm_sv Running \'make clean\' in the background + pm_v "===>>> Running 'make clean' in the background" (pm_make_s clean NOCLEANDEPENDS=ncd2 >/dev/null)& - echo '' + pm_v fi check_dependency_files $portdir $new_port
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206100524.q5A5OOYG074810>