[Qa-jenkins-scm] [jenkins.debian.net] 04/05: refactor: rename variable

Holger Levsen holger at moszumanska.debian.org
Mon Mar 16 12:56:22 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 2b6f9c9eb0d7d115e60b2ecd5412d2ce38fb5787
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Mar 16 13:52:28 2015 +0100

    refactor: rename variable
---
 bin/reproducible_common.sh             | 5 +++--
 bin/reproducible_schedule_on_demand.sh | 5 ++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 3df7737..fa56d58 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -88,17 +88,18 @@ schedule_packages() {
 }
 
 check_candidates() {
-	PACKAGES=""
+	PACKAGE_IDS=""
 	PACKAGES_NAMES=""
 	TOTAL=0
 	for PKG in $CANDIDATES ; do
 		RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT id, name from sources WHERE name='$PKG' AND suite='$SUITE';")
 		if [ ! -z "$RESULT" ] ; then
-			PACKAGES="$PACKAGES $(echo $RESULT|cut -d '|' -f 1)"
+			PACKAGE_IDS="$PACKAGE_IDS $(echo $RESULT|cut -d '|' -f 1)"
 			PACKAGES_NAMES="$PACKAGES_NAMES $(echo $RESULT|cut -d '|' -f 2)"
 			let "TOTAL+=1"
 		fi
 	done
+	PACKAGE_IDS=$(echo $PACKAGE_IDS)
 	case $TOTAL in
 	1)
 		PACKAGES_TXT="package"
diff --git a/bin/reproducible_schedule_on_demand.sh b/bin/reproducible_schedule_on_demand.sh
index 0866ea0..07df687 100755
--- a/bin/reproducible_schedule_on_demand.sh
+++ b/bin/reproducible_schedule_on_demand.sh
@@ -19,10 +19,9 @@ SUITE="$1"
 shift
 CANDIDATES="$@"
 check_candidates
-if [ ${#PACKAGES} -gt 256 ] ; then
+if [ ${#PACKAGE_IDS} -gt 256 ] ; then
 	BLABLABLA="..."
 fi
-PACKAGES=$(echo $PACKAGES)
 ACTION="manually rescheduled"
 if [ -n "${BUILD_URL:-}" ] ; then
 	ACTION="rescheduled by $BUILD_URL"
@@ -30,7 +29,7 @@ fi
 MESSAGE="$TOTAL $PACKAGES_TXT $ACTION for $SUITE: ${PACKAGES_NAMES:0:256}$BLABLABLA"
 
 # finally
-schedule_packages $PACKAGES
+schedule_packages $PACKAGE_IDS
 echo
 echo "$MESSAGE"
 if [ -z "${BUILD_URL:-}" ] ; then

-- 
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