[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Archlinux: schedule new packages in db
Holger Levsen
gitlab at salsa.debian.org
Sat Sep 22 16:27:28 BST 2018
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
76abb1e2 by Holger Levsen at 2018-09-22T15:27:14Z
reproducible Archlinux: schedule new packages in db
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- TODO
- bin/reproducible_archlinux_scheduler.sh
Changes:
=====================================
TODO
=====================================
@@ -330,10 +330,8 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
** create page for untested packages?
* use db
-** use debian tables with suite=archlinux_core etc and arch=x86_64
** problem: we currently have more (detailed) stati in archlinux
-** extend scheduler.sh to add packages to db and schedule them in db
-*** enable FIXME line once the db has been initially populated
+** extend scheduler.sh:
*** actually schedule old packages once queue is empty
*** also delete unknown packages from db
*** check/make sure that updated packages are only scheduled once
=====================================
bin/reproducible_archlinux_scheduler.sh
=====================================
@@ -76,20 +76,21 @@ update_archlinux_repositories() {
#
# db based scheduler
#
+ echo -n "."
PKG=$pkgbase
SUITE="archlinux_$repo"
ARCH="x86_64"
VERSION=$(query_db "SELECT version FROM sources WHERE name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';" || query_db "SELECT version FROM sources WHERE name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
- echo "- result: VERSION=$VERSION"
if [ -z "$VERSION" ] ; then
+ echo
# 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';")
- #FIXME: enable next line once the db has been initially populated
- # query_db "INSERT INTO schedule (package_id, date_scheduled) VALUES ('$PKGID', '$DATE');"
+ 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');"
elif [ "$VERSION" != "$version" ] ; then
+ echo
VERCMP="$(schroot --run-session -c $SESSION --directory /var/tmp -- vercmp $version $VERSION || true)"
if [ "$VERCMP" = "1" ] ; then
# known package but with new version, update db and schedule
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/76abb1e2873cae60581c72028fe7c7ee2dd8a2f2
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/76abb1e2873cae60581c72028fe7c7ee2dd8a2f2
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/ac3de3d1/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list