Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Apr 2011 03:16:15 +0000 (UTC)
From:      Doug Barton <dougb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r221195 - user/dougb/portmaster
Message-ID:  <201104290316.p3T3GF3Y080709@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougb
Date: Fri Apr 29 03:16:15 2011
New Revision: 221195
URL: http://svn.freebsd.org/changeset/base/221195

Log:
  Recursive irony alert:
  When called from gen_dep_list, which also uses temp_list as a local
  variable, uniquify_list needs its own set of local variables otherwise
  temp_list ends up being duplicated by uniquify_list
  
  Continue the campaign to unset things to keep the environment small

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Apr 29 01:14:12 2011	(r221194)
+++ user/dougb/portmaster/portmaster	Fri Apr 29 03:16:15 2011	(r221195)
@@ -2284,16 +2284,16 @@ update_port () {
 }
 
 uniquify_list () {
-	local item temp_list
+	local ul_item ul_temp_list
 
-	for item in "$@"; do
-		case "$temp_list" in
-		*" $item "*) ;;
-		*)	temp_list=" $temp_list $item " ;;
+	for ul_item in "$@"; do
+		case "$ul_temp_list" in
+		*" $ul_item "*) ;;
+		*)	ul_temp_list=" $ul_temp_list $ul_item " ;;
 		esac
 	done
 
-	echo $temp_list
+	echo $ul_temp_list
 }
 
 clean_build_only_list () {
@@ -2989,6 +2989,7 @@ if [ -z "$REPLACE_ORIGIN" ]; then
 		esac
 		unset glob_dirs
 	fi
+	unset argv
 else
 	portdir="${1#$pd/}" ; portdir="${portdir%/}"
 	if [ -z "$PM_INDEX_ONLY" ]; then
@@ -3217,6 +3218,7 @@ if [ -n "$PM_FIRST_PASS" ]; then
 	fi
 
 	dependency_check "$dep_check_type"
+# XXX
 
 	[ -n "$UPDATE_REQ_BYS" -o -n "$URB_YES" ] &&
 		URB_DONE_LIST="${URB_DONE_LIST}${upg_port}:"
@@ -3814,6 +3816,7 @@ if [ -n "$upg_port" ]; then
 	else
 		ilist="Re-installation of $upg_port"
 	fi
+	unset argv
 else
 	ilist="Installation of $portdir ($new_port)"
 fi



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