[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible Debian: refactor

Holger Levsen gitlab at salsa.debian.org
Wed Feb 20 12:34:08 GMT 2019


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


Commits:
81627297 by Holger Levsen at 2019-02-20T12:26:09Z
reproducible Debian: refactor

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

- - - - -
13f7d691 by Holger Levsen at 2019-02-20T12:33:59Z
reproducible Debian: refactor

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
=====================================
@@ -75,22 +75,22 @@ for package in $packages ; do
 	date -u
 	schroot --directory  $SHA1DIR -c chroot:jenkins-reproducible-unstable-diffoscope apt-get download ${package} || continue
 	date -u
-	if [ $(ls -1 ${package}_*.deb | wc -l) -ne 1 ] ; then
-		DEB="$(ls -1 ${package}_*.deb | heads -1)"
-		echo "deleting $DEB..."
-		rm $DEB # first I thought to delete $DEB* but only deleting $DEB is better
+	package_file="$(ls -1 ${package}_*.deb)"
+	if [ $(echo "${package_file}" | wc -l) -ne 1 ] ; then
+		OLD_DEB=$(echo "${package_file}" | head -1)
+		echo "deleting $OLD_DEB..."
+		rm $OLD_DEB # first I thought to delete $OLD_DEB* but only deleting $OLD_DEB is better
+		package_file=$(echo "${package_file}" | tail -1 )
 	fi
-	package_file=$(ls ${package}_*.deb)
 	date -u
 	if [ ! -e ${package_file}.sha1output ] ; then
-		SHA1SUM_OUTPUT="$(sha1sum ${package}_*.deb | tee ${package_file}.sha1output)"
+		SHA1SUM_PKG="$(sha1sum ${package_file} | tee ${package_file}.sha1output | awk '{print $1}' )"
 	else
-		SHA1SUM_OUTPUT="$(cat ${package_file}.sha1output)"
+		SHA1SUM_PKG="$(cat ${package_file}.sha1output | awk '{print $1}' )"
 	fi
-	SHA1SUM_PKG="$(echo $SHA1SUM_OUTPUT | awk '{print $1}' 2>/dev/null)"
 	date -u
 	if [ ! -e ${package_file}.json ]; then
-		wget --quiet -O ${package_file}.json ${bdn_url}/${checksum}
+		wget --quiet -O ${package_file}.json ${bdn_url}/${SHA1SUM_PKG}
 	fi
 	date -u
 	count=$(fmt ${package_file}.json | grep -c '\.buildinfo' || true)



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/4790d3af8ea31afa37185dfef5699f702d3e92a6...13f7d69172de82ba3bb764a91f8f2cc6f2c84396

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/4790d3af8ea31afa37185dfef5699f702d3e92a6...13f7d69172de82ba3bb764a91f8f2cc6f2c84396
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/f3e0e6e6/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list