[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: turn some more global variables into local ones

Holger Levsen holger at moszumanska.debian.org
Mon May 18 17:01:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 334c1b7de39c407e9a97325169dbe8facdc2b827
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon May 18 19:01:25 2015 +0200

    reproducible: turn some more global variables into local ones
---
 bin/reproducible_common.sh      | 15 +++++++++------
 bin/reproducible_html_graphs.sh |  1 +
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 69c205a..f511b2d 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -256,17 +256,19 @@ publish_page() {
 }
 
 link_packages() {
+        local i
 	for (( i=1; i<$#+1; i=i+400 )) ; do
 		local string='['
 		local delimiter=''
+		local j
 		for (( j=0; j<400; j++)) ; do
 			local item=$(( $j+$i ))
 			if (( $item < $#+1 )) ; then
-				local string+="${delimiter}\"${!item}\""
-				local delimiter=','
+				string+="${delimiter}\"${!item}\""
+				delimiter=','
 			fi
 		done
-		local string+=']'
+		string+=']'
 		cd /srv/jenkins/bin
 		DATA=" $(python3 -c "from reproducible_common import link_packages; \
 				print(link_packages(${string}, '$SUITE', '$ARCH'))" 2> /dev/null)"
@@ -280,11 +282,12 @@ gen_packages_html() {
 	shift
 	CWD=$(pwd)
 	cd /srv/jenkins/bin
+	local i
 	for (( i=1; i<$#+1; i=i+100 )) ; do
-		string='['
-		delimiter=''
+		local string='['
+		local delimiter=''
 		for (( j=0; j<100; j++)) ; do
-			item=$(( $j+$i ))
+			local item=$(( $j+$i ))
 			if (( $item < $#+1 )) ; then
 				string+="${delimiter}\"${!item}\""
 				delimiter=','
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh
index ce8a467..2cf2c81 100755
--- a/bin/reproducible_html_graphs.sh
+++ b/bin/reproducible_html_graphs.sh
@@ -451,6 +451,7 @@ create_pkg_sets_pages() {
 	#
 	# create individual pages for all the sets
 	#
+	local i
 	for i in $(seq 1 ${#META_PKGSET[@]}) ; do
 		PAGE="pkg_set_${META_PKGSET[$i]}.html"
 		echo "$(date) - starting to write $PAGE page."

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list