[Qa-jenkins-scm] [jenkins.debian.net] 01/03: reproducible archlinux: build all packages from 'extra' repository too

Holger Levsen holger at moszumanska.debian.org
Fri Dec 11 13:15:47 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 ac4e669fb3e393bd98c73905375693ef19969d5a
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Dec 11 14:10:18 2015 +0100

    reproducible archlinux: build all packages from 'extra' repository too
---
 bin/reproducible_build_archlinux_pkg.sh | 45 ++++++++++++++++++---------------
 bin/reproducible_html_archlinux.sh      |  2 +-
 2 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 17cddcd..f1d7a50 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -43,28 +43,33 @@ choose_package() {
 	echo "$(date -u ) - about to choose a package to be build"
 	# every 2 days we check for new archlinux packages
 	touch -d "$(date -d '2 days ago' '+%Y-%m-%d') 00:00 UTC" $DUMMY
-	if [ ! -f $ARCHLINUX_PKGS ] || [ $DUMMY -nt $ARCHLINUX_PKGS ] ; then
-		REPOSITORY="core"
-		echo "$(date -u ) - updating list of available packages in repository '$REPOSITORY'."
-		local SESSION="archlinux-scheduler-$RANDOM"
-		schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux
-		schroot --run-session -c $SESSION --directory /var/abs/$REPOSITORY -- ls -1|sort -R|xargs echo > $ARCHLINUX_PKGS
-		schroot --end-session -c $SESSION
-	fi
-	rm $DUMMY > /dev/null
-	echo "$(date -u ) - these packages in repository '$REPOSITORY' are known to us:"
-	cat $ARCHLINUX_PKGS
-	for PKG in $(cat $ARCHLINUX_PKGS) ; do
-		# build package if it has never build or at least a week ago
-		if [ ! -d $BASE/archlinux/$REPOSITORY/$PKG ] || [ ! -z $(find $BASE/archlinux/$REPOSITORY/ -name $PKG -mtime +6) ] ; then
-			SRCPACKAGE=$PKG
-			echo "$(date -u ) - building package $PKG from '$REPOSITORY' now..."
-			# very simple locking…
-			mkdir -p $BASE/archlinux/$REPOSITORY/$PKG
-			touch $BASE/archlinux/$REPOSITORY/$PKG
-			break
+	schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux
+	for REPOSITORY in core extra ; do
+		if [ ! -f ${ARCHLINUX_PKGS}_$REPOSITORY ] || [ $DUMMY -nt ${ARCHLINUX_PKGS}_$REPOSITORY ] ; then
+			echo "$(date -u ) - updating list of available packages in repository '$REPOSITORY'."
+			local SESSION="archlinux-scheduler-$RANDOM"
+			schroot --run-session -c $SESSION --directory /var/abs/$REPOSITORY -- ls -1|sort -R|xargs echo > ${ARCHLINUX_PKGS}_$REPOSITORY
+			echo "$(date -u ) - these packages in repository '$REPOSITORY' are known to us:"
+			cat ${ARCHLINUX_PKGS}_$REPOSITORY
 		fi
 	done
+	schroot --end-session -c $SESSION
+	rm $DUMMY > /dev/null
+	for REPOSITORY in core extra ; do
+		for PKG in $(cat ${ARCHLINUX_PKGS}_$REPOSITORY) ; do
+			# build package if it has never build or at least a week ago
+			if [ ! -d $BASE/archlinux/$REPOSITORY/$PKG ] || [ ! -z $(find $BASE/archlinux/$REPOSITORY/ -name $PKG -mtime +6) ] ; then
+				SRCPACKAGE=$PKG
+				echo "$(date -u ) - building package $PKG from '$REPOSITORY' now..."
+				# very simple locking…
+				mkdir -p $BASE/archlinux/$REPOSITORY/$PKG
+				touch $BASE/archlinux/$REPOSITORY/$PKG
+				# break out of the loop and then out of this function too,
+				# to build this package…
+				break
+			fi
+		done
+	done
 	if [ -z $SRCPACKAGE ] ; then
 		echo "$(date -u ) - no package found to be build, sleeping 6h."
 		for i in $(seq 1 12) ; do
diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh
index 0e92e0e..04847ec 100755
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -38,7 +38,7 @@ EOF
 write_page_intro 'Arch Linux'
 write_explaination_table 'Arch Linux'
 write_page "    <table><tr><th>repository</th><th>source package</th><th>test result</th><th>test date</th><th>1st build log</th><th>2nd build log</th></tr>"
-for REPOSITORY in "core" ; do
+for REPOSITORY in core extra ; do
 	for PKG in $(find $ARCHBASE/$REPOSITORY/* -maxdepth 1 -type d -exec basename {} \;) ; do
 		write_page "     <tr>"
 		write_page "      <td>$REPOSITORY</td>"

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