svn commit: r203646 - user/dougb/portmaster

Doug Barton dougb at FreeBSD.org
Mon Feb 8 04:12:11 UTC 2010


Author: dougb
Date: Mon Feb  8 04:12:10 2010
New Revision: 203646
URL: http://svn.freebsd.org/changeset/base/203646

Log:
  1. Add code so that if a user has an +IGNOREME file for a port that
  is a dependency and chooses not to update it we will not falsely claim
  that it will be udpated in post_config().
  
  This requires moving the writing of num_of_deps and build_l to IPC_SAVE
  into safe_exit() so that the modified values will be read by the parent.
  
  2. If a user chose -G don't print the (${dep_of_deps}/${num_of_deps})
  in the xterm title since the latter will not be incremented. This has
  the pleasant side effect of allowing better indenting of the code.
  
  3. Remove debug code.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Mon Feb  8 03:11:55 2010	(r203645)
+++ user/dougb/portmaster/portmaster	Mon Feb  8 04:12:10 2010	(r203646)
@@ -215,8 +215,13 @@ safe_exit () {
 
 			[ -n "$PM_DEL_BUILD_ONLY" ] &&
 			echo "build_deps_il='$build_deps_il'" >> $IPC_SAVE
-		elif [ -z "$NO_DEP_UPDATES" ]; then
-			echo 'unset NO_DEP_UPDATES' >> $IPC_SAVE
+		else
+			# Do these here so +IGNOREME can modify them
+			echo "num_of_deps='$num_of_deps'" >> $IPC_SAVE
+			echo "build_l='$build_l'" >> $IPC_SAVE
+			if [ -z "$NO_DEP_UPDATES" ]; then
+				echo 'unset NO_DEP_UPDATES' >> $IPC_SAVE
+			fi
 		fi
 		[ -z "$NO_BACKUP" -a -z "$BACKUP" ] &&
 			echo "NB_DELETE='$NB_DELETE'" >> $IPC_SAVE
@@ -1703,21 +1708,25 @@ update_port () {
 	[ -n "$2" ] && update_to=" to $2"
 	echo "===>>> Launching child to update ${1#$pd/}${update_to}"
 
-	dep_of_deps=$(( $dep_of_deps + 1 ))
+	if [ -z "$NO_RECURSIVE_CONFIG" ]; then
+		local deps
 
-	if [ -n "$CONFIG_ONLY" ]; then
-		num_of_deps=$(( $num_of_deps + 1 ))
-		update_build_l $1
+		dep_of_deps=$(( $dep_of_deps + 1 ))
+
+		if [ -n "$CONFIG_ONLY" ]; then
+			num_of_deps=$(( $num_of_deps + 1 ))
+			update_build_l $1
+		fi
+
+		deps=" (${dep_of_deps}/${num_of_deps})"
 	fi
 
 	if [ -n "$PM_DEPTH" ]; then
 		echo "	${PM_DEPTH}>> ${1#$pd/}"
-term_printf " ${PM_DEPTH#* }>> ${1#$pd/} (${dep_of_deps}/${num_of_deps})"
+		term_printf " ${PM_DEPTH#* }>> ${1#$pd/}${deps}"
 	else
 		if [ -n "$UPDATE_ALL" ]; then
-		term_printf " >> ${1#$pd/} (${dep_of_deps}/${num_of_deps})"
-		else
-#echo '' ; echo "Debug> NO PM_DEPTH HERE" ; echo ''
+			term_printf " >> ${1#$pd/}${deps}"
 		fi
 	fi
 
@@ -1742,7 +1751,7 @@ term_printf " ${PM_DEPTH#* }>> ${1#$pd/}
 	elif [ -n "$CONFIG_ONLY" -a -z "$PM_PACKAGES" ]; then
 	echo "===>>> Continuing 'make config' dependency check for $portdir"
 	else
-term_printf " ${PM_DEPTH#* }(${dep_of_deps}/${num_of_deps})"
+		term_printf " ${PM_DEPTH#* }${deps}"
 		echo "===>>> Returning to dependency check for $portdir"
 	fi
 	return 0
@@ -1937,7 +1946,11 @@ dependency_check () {
 		case "$PM_DEPTH" in
 		*\>\>*)	echo "	$PM_DEPTH" ;;
 		*)	if [ "$PM_PARENT_PORT" = All ]; then
-	term_printf " >> ${upg_port:-$portdir} (${dep_of_deps}/${num_of_deps})"
+				if [ -z "$NO_RECURSIVE_CONFIG" ]; then
+					local deps
+					deps=" (${dep_of_deps}/${num_of_deps})"
+				fi
+				term_printf " >> ${upg_port:-$portdir}${deps}"
 			else
 				term_printf
 			fi ;;
@@ -2015,14 +2028,9 @@ echo "       all of the above try adding
 
 			[ "$real_rundep" = 'no' ] &&
 			eval build_only_dl_g=\"${build_only_dl_g}\$${var}_p \"
-
-#[ "$real_rundep" = 'no' ] && printf "\nDebug> Inserting $var into bodlg\n\n"
-
 			eval unset $var ${var}_p
 		done
 
-#echo "Debug> build_only_dl_g: X${build_only_dl_g}X" ; echo ''
-
 		unset run_dl_g rundep_list
 		PM_BUILD_ONLY_LIST=pm_bol
 	fi
@@ -2420,6 +2428,15 @@ if [ -e "$pdb/$upg_port/+IGNOREME" ]; th
 				case "$answer" in
 				[yY]) ;;	# Let it build
 				*) CUR_DEPS="${CUR_DEPS}${upg_port}:${portdir}:"
+			# Outdent
+			if [ $dep_of_deps -gt 0 ]; then
+				dep_of_deps=$(( $dep_of_deps - 1 ))
+				if [ -n "$CONFIG_ONLY" ]; then
+					num_of_deps=$(( $num_of_deps - 1 ))
+					build_l="${build_l%\t*}"
+				fi
+			fi
+			# Outdent
 					safe_exit ;;
 				esac
 			else
@@ -2550,8 +2567,6 @@ if [ -n "$CONFIG_ONLY" ]; then
 	if [ ! "$$" -eq "$PM_PARENT_PID" ]; then
 		# Save state for the parent process to read back in
 		echo "CONFIG_SEEN_LIST='$CONFIG_SEEN_LIST'" > $IPC_SAVE
-		echo "num_of_deps='$num_of_deps'" >> $IPC_SAVE
-		echo "build_l='$build_l'" >> $IPC_SAVE
 
 		if [ "$PM_BUILD_ONLY_LIST" = pmp_doing_build_deps ]; then
 			echo "build_only_dl_g='$build_only_dl_g'" >> $IPC_SAVE


More information about the svn-src-user mailing list