Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-03 13:58:47 +0100
committerErich Eckner <git@eckner.net>2018-02-03 13:58:47 +0100
commit3ef5bfb56e453c9674f99e7f5a64b66835f58b8f (patch)
tree0a2f4eb63296a4472c303656b3eb73e26de5e49a /bin
parent37c1de524dad0a1363502ac2308f0091dd70b3d2 (diff)
bin/get-assignment: only hand out the same package again if it is _still_ on the build-list
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-assignment9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 85585c0..67c7aa4 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -123,18 +123,19 @@ clean_up() {
tmp_dir=$(mktemp -d 'tmp.get-assignment.XXXXXXXXXX' --tmpdir)
trap clean_up EXIT
-# TODO: only hand out package if it is still yet to be built
-
# if we're building something already, hand it out (again)
currently_building=$(
# shellcheck disable=SC2016
{
printf 'SELECT '
mysql_query_select_pkgbase_and_revision
- printf ' JOIN `build_slaves`'
- printf ' ON `build_slaves`.`currently_building`=`build_assignments`.`id`'
+ printf ' JOIN `%s` ON `%s`.`%s`=`%s`.`id`' \
+ 'build_slaves' 'build_slaves' 'currently_building' 'build_assignments' \
+ 'binary_packages' 'binary_packages' 'build_assignment' 'build_assignments' \
+ 'repositories' 'binary_packages' 'repository' 'repositories'
printf ' WHERE `build_slaves`.`name`=from_base64("%s")' \
"$(printf '%s' "${slave}" | base64 -w0)"
+ printf ' AND `repositories`.`name`="build-list"'
printf ' LIMIT 1;\n'
} | \
${mysql_command} --batch --raw | \