Skip to content
Snippets Groups Projects
Verified Commit a30c3c18 authored by Mattia Rizzolo's avatar Mattia Rizzolo
Browse files

reproducible archlinux: make sure to define DISTROID before using it


Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent c891a865
No related branches found
No related tags found
No related merge requests found
...@@ -107,7 +107,6 @@ update_archlinux_repositories() { ...@@ -107,7 +107,6 @@ update_archlinux_repositories() {
# new package, add to db and schedule # new package, add to db and schedule
echo $REPO/$pkgbase >> $NEW echo $REPO/$pkgbase >> $NEW
echo "new package found: $repo/$pkgbase $version " echo "new package found: $repo/$pkgbase $version "
DISTROID=$(query_db "SELECT id FROM distributions WHERE name = 'archlinux'")
query_db "INSERT into sources (name, version, suite, architecture, distribution) VALUES ('$PKG', '$version', '$SUITE', '$ARCH', $DISTROID);" query_db "INSERT into sources (name, version, suite, architecture, distribution) VALUES ('$PKG', '$version', '$SUITE', '$ARCH', $DISTROID);"
PKG_ID=$(query_db "SELECT id FROM sources WHERE distribution=$DISTROID AND name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';") PKG_ID=$(query_db "SELECT id FROM sources WHERE distribution=$DISTROID AND name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
query_db "INSERT INTO schedule (package_id, date_scheduled) VALUES ('${PKG_ID}', '$DATE');" query_db "INSERT INTO schedule (package_id, date_scheduled) VALUES ('${PKG_ID}', '$DATE');"
...@@ -269,6 +268,7 @@ update_archlinux_repositories() { ...@@ -269,6 +268,7 @@ update_archlinux_repositories() {
trap cleanup_all INT TERM EXIT trap cleanup_all INT TERM EXIT
ARCH="x86_64" ARCH="x86_64"
SESSION="archlinux-scheduler-$RANDOM" SESSION="archlinux-scheduler-$RANDOM"
DISTROID=$(query_db "SELECT id FROM distributions WHERE name = 'archlinux'")
update_archlinux_repositories update_archlinux_repositories
trap - INT TERM EXIT trap - INT TERM EXIT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment