[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian: improve locking behaviour and improve output

Holger Levsen gitlab at salsa.debian.org
Wed Feb 20 20:23:19 GMT 2019


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


Commits:
a5cd1e94 by Holger Levsen at 2019-02-20T20:22:52Z
reproducible Debian: improve locking behaviour and improve output

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

- - - - -


1 changed file:

- bin/reproducible_compare_Debian_sha1sums.sh


Changes:

=====================================
bin/reproducible_compare_Debian_sha1sums.sh
=====================================
@@ -84,15 +84,14 @@ rm -f *.lock	# this is a tiny bit hackish, but also an elegant way to get rid of
 
 for package in $packages ; do
 	cd $SHA1DIR
-	echo
 	LOCK="$SHA1DIR/${package}.lock"
 	if [ -e $LOCK ] ; then
-		echo "$(date -u) - skipping locked package $package"
+		echo "$(date -u) - skipping locked package $package, sleeping a minute to deescalate."
+		sleep 60
 		continue
 	else
 		touch $LOCK
 	fi
-	echo "$(date -u) - checking whether we have seen the .deb for $package before"
 	version=$(grep-dctrl -X -P ${package} -s version -n $PACKAGES)
 	arch=$(grep-dctrl -X -P ${package} -s Architecture -n $PACKAGES)
 	package_file="${package}_$(echo $version | sed 's#:#%3a#')_${arch}.deb"
@@ -101,7 +100,6 @@ for package in $packages ; do
 	cd $pool_dir
 	if [ "$MODE" = "results" ] ; then
 	        if  [ -e ${package_file}.json ] ; then
-			echo "$(date -u) - generating result"
 			count=$(fmt ${package_file}.json | grep -c '\.buildinfo' || true)
 			if [ "${count}" -ge 2 ]; then
 				echo "$(date -u) - REPRODUCIBLE: $package_file: $SHA1SUM_PKG - reproduced $count times."
@@ -112,9 +110,9 @@ for package in $packages ; do
 		continue
 	fi
 	if [ ! -e ${package_file}.sha1output ] ; then
-		echo -n "$(date -u) - preparing to download $filename"
+		echo -n "$(date -u) - downloading... "
 		( schroot --directory  $SHA1DIR/$pool_dir -c chroot:jenkins-reproducible-${RELEASE}-diffoscope apt-get download ${package}/${RELEASE} 2>&1 |xargs echo ) || continue
-		echo "$(date -u) - calculating sha1sum"
+		echo "$(date -u) - calculating sha1sum for ${package_file}"
 		SHA1SUM_PKG="$(sha1sum ${package_file} | tee ${package_file}.sha1output | awk '{print $1}' )"
 		rm ${package_file}
 	else
@@ -122,10 +120,10 @@ for package in $packages ; do
 		SHA1SUM_PKG="$(cat ${package_file}.sha1output | awk '{print $1}' )"
 	fi
 	if [ ! -e ${package_file}.json ]; then
-		echo "$(date -u) - downloading .json from buildinfo.debian.net"
+		echo "$(date -u) - downloading .json for ${SHA1SUM_PKG} from buildinfo.debian.net"
 		wget --quiet -O ${package_file}.json ${bdn_url}/${SHA1SUM_PKG} || echo "WARNING: failed to download ${bdn_url}/${SHA1SUM_PKG}"
 	else
-		echo "$(date -u) - reusing local copy of .json from buildinfo.debian.net"
+		echo "$(date -u) - reusing local copy of .json for ${SHA1SUM_PKG} from buildinfo.debian.net"
 	fi
 	rm -f $LOCK
 done | tee $log



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/a5cd1e9421932e19f4fd17db62630855b5647285
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/20190220/81d19d76/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list