[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Archlinux: only remove from database if pkg exists in db

Holger Levsen gitlab at salsa.debian.org
Mon Oct 1 11:21:41 BST 2018


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


Commits:
fa84aa8c by Holger Levsen at 2018-10-01T10:21:20Z
reproducible Archlinux: only remove from database if pkg exists in db

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

- - - - -


2 changed files:

- TODO
- bin/reproducible_archlinux_scheduler.sh


Changes:

=====================================
TODO
=====================================
@@ -324,6 +324,7 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
 ** html:
 *** leave all pkg.html files, delete them (much) later, then check all pkg.* files are gone
 *** recreate them newly as index.html
+**** link to https://www.archlinux.org/packages/$repo/x86_64/$pkgname/
 **** provide links to debian pages if same package name exist
 *** create new job to recreate all pkg pages
 *** create json


=====================================
bin/reproducible_archlinux_scheduler.sh
=====================================
@@ -65,10 +65,14 @@ update_archlinux_repositories() {
 					echo "$(date -u) - $REPO/$PKG removed as it's gone from the Archlinux repositories."
 					SUITE="archlinux_$repo"
 					PKG_ID=$(query_db "SELECT id FROM sources WHERE name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
-					query_db "DELETE FROM results WHERE package_id='${PKG_ID}';"
-					query_db "DELETE FROM schedule WHERE package_id='${PKG_ID}';"
-					query_db "DELETE FROM sources WHERE id='${PKG_ID}';"
-					echo "$(date -u) - $SUITE $PKG removed from database."
+					if [ -n "${PKG_ID}" ] ; then
+						query_db "DELETE FROM results WHERE package_id='${PKG_ID}';"
+						query_db "DELETE FROM schedule WHERE package_id='${PKG_ID}';"
+						query_db "DELETE FROM sources WHERE id='${PKG_ID}';"
+						echo "$(date -u) - $SUITE $PKG removed from database."
+					else
+						echo "$(date -u) - $SUITE $PKG not found in database."
+					fi
 				fi
 			done
 		done



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/fa84aa8ccdba5b98245659f71dc0f0fe826a62ab
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/20181001/5bbdbd11/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list