[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Archlinux: drop all references of pkg.needs_build files

Holger Levsen gitlab at salsa.debian.org
Sat Sep 22 19:21:52 BST 2018


Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
f13a7008 by Holger Levsen at 2018-09-22T18:20:05Z
reproducible Archlinux: drop all references of pkg.needs_build files

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


3 changed files:

- TODO
- bin/reproducible_archlinux_scheduler.sh
- bin/reproducible_html_archlinux.sh


Changes:

=====================================
TODO
=====================================
@@ -341,13 +341,8 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
 *** check/make sure that packages which are newer in trunk than repo are only scheduled once
 ** make build.sh
 *** write db
-*** delete all pkg.needs_build files on disk
-*** drop all occurrances of pkg.needs_build from the code
-*** really share /var/log/jenkins/reproducible-stale-builds.log
- with debian?
-*** same for /var/log/jenkins/reproducible-race-conditions.log
-**** i think we want to split those... (into debian and archlinux ones)
-** make build respect pacman exit code
+*** do not share /var/log/jenkins/reproducible-race-conditions.log with debian
+*** make build respect pacman exit code
 ** create new job to recreate all pkg pages
 ** call pkg html function after each build
 ** cleanup now useless code from scheduler


=====================================
bin/reproducible_archlinux_scheduler.sh
=====================================
@@ -13,7 +13,8 @@ common_init "$@"
 set -e
 
 update_archlinux_repositories() {
-	echo "$(date -u) - Updating Arch Linux repositories, currently $(find $BASE/archlinux/ -name pkg.needs_build | wc -l ) packages scheduled."
+	local total= $(query_db "SELECT count(*) FROM sources AS s JOIN schedule AS sch ON s.id=sch.package_id WHERE s.architecture='x86_64' and sch.date_build_started is NULL;")
+	echo "$(date -u) - Updating Arch Linux repositories, currently $total packages scheduled."
 	#
 	# init
 	#
@@ -88,7 +89,6 @@ update_archlinux_repositories() {
 				if [ -z "$VERSION" ] ; then
 					# new package, add to db and schedule
 					echo "new package found: $repo/$pkgbase $version "
-					echo " INSERT into sources (name, version, suite, architecture) VALUES ('$PKG', '$version', '$SUITE', '$ARCH');"
 					query_db "INSERT into sources (name, version, suite, architecture) VALUES ('$PKG', '$version', '$SUITE', '$ARCH');"
 					PKGID=$(query_db "SELECT id FROM sources WHERE name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
 					query_db "INSERT INTO schedule (package_id, date_scheduled) VALUES ('$PKGID', '$DATE');"
@@ -142,7 +142,7 @@ update_archlinux_repositories() {
 	#
 	# output stats
 	#
-	total=$(find $BASE/archlinux/ -name pkg.needs_build | wc -l )
+	total= $(query_db "SELECT count(*) FROM sources AS s JOIN schedule AS sch ON s.id=sch.package_id WHERE s.architecture='x86_64' and sch.date_build_started is NULL;")
 	rm "$ARCHLINUX_PKGS"_full_pkgbase_list
 	new=$(cat $NEW | wc -l 2>/dev/null|| true)
 	updated=$(cat $UPDATED 2>/dev/null| wc -l || true)


=====================================
bin/reproducible_html_archlinux.sh
=====================================
@@ -58,9 +58,7 @@ create_pkg_state_and_html() {
 				blacklisted=true
 			fi
 		done
-		if ! $blacklisted && [ -f $ARCHLINUX_PKG_PATH/pkg.needs_build ] ; then
-			echo "$(date -u )   - ok, $PKG from '$REPOSITORY' needs build, this should go away by itself."
-		elif ! $blacklisted ; then
+		if ! $blacklisted ; then
 			echo "$(date -u )   - cannot determine state of $PKG from '$REPOSITORY', please check $ARCHLINUX_PKG_PATH yourself."
 		fi
 	fi



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/f13a7008b05ed2616a0b6d90af98cb9b2dfc1fee

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/f13a7008b05ed2616a0b6d90af98cb9b2dfc1fee
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20180922/ea0f6392/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list