Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Oct 2011 02:43:36 +0000 (UTC)
From:      Doug Barton <dougb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r226955 - user/dougb/portmaster
Message-ID:  <201110310243.p9V2haVw095400@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougb
Date: Mon Oct 31 02:43:36 2011
New Revision: 226955
URL: http://svn.freebsd.org/changeset/base/226955

Log:
  If an update fails in a child port the parent needs to source the $IPC_SAVE
  file before it bails out to make sure that various lists are updated in the
  parent. This is particularly important for the list(s) of work already
  completed, and especially to update PM_NEEDS_UPDATE for the message of how
  to resume from the point of failure.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Mon Oct 31 00:10:11 2011	(r226954)
+++ user/dougb/portmaster/portmaster	Mon Oct 31 02:43:36 2011	(r226955)
@@ -2291,8 +2291,9 @@ update_port () {
 		unset NO_DEP_UPDATES
 
 	if [ -z "$NO_ACTION" -o -n "$PM_FIRST_PASS" ]; then
-		($0 $ARGS $1) || fail "Update for $1 failed"
+		($0 $ARGS $1) || update_failed=update_failed
 		. $IPC_SAVE
+		[ -n "$update_failed" ] && fail "Update for $1 failed"
 	else
 		pm_v "===>>> Build canceled due to -n flag"
 	fi
@@ -2780,8 +2781,9 @@ multiport () {
 
 		numports=$(( $numports + 1 ))
 		init_term_printf "$port ${numports}/${numports}"
-		($0 $ARGS $port) || fail "Update for $port failed"
+		($0 $ARGS $port) || update_failed=update_failed
 		. $IPC_SAVE
+		[ -n "$update_failed" ] && fail "Update for $port failed"
 
 		case "$PM_NEEDS_UPDATE" in
 		*\ $origin\ *)	continue ;;	# Handle +IGNOREME in child
@@ -2821,8 +2823,9 @@ multiport () {
 
 		num=$(( $num + 1 ))
 		init_term_printf "$port ${num}/${numports}"
-		($0 $ARGS $port) || fail "Update for $port failed"
+		($0 $ARGS $port) || update_failed=update_failed
 		. $IPC_SAVE
+		[ -n "$update_failed" ] && fail "Update for $port failed"
 	done
 
 	if [ -n "$PM_URB" ]; then



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110310243.p9V2haVw095400>