summaryrefslogtreecommitdiff
path: root/bin/return-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-12 16:36:29 +0200
committerErich Eckner <git@eckner.net>2018-09-12 16:36:29 +0200
commitad267ce6efe34f218490c41ef92e02c1f44efeea (patch)
tree2ef64be053a4d9213efe4e6882056f296a1db590 /bin/return-assignment
parentddf595ef3b3cfdb830404b60d10424c689525442 (diff)
downloadbuilder-ad267ce6efe34f218490c41ef92e02c1f44efeea.tar.xz
bin/build-packages: transmit arch to return-assignment, so that build-assignment can be better verified
Diffstat (limited to 'bin/return-assignment')
-rwxr-xr-xbin/return-assignment21
1 files changed, 15 insertions, 6 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 3f355bd..a9605b1 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -41,14 +41,14 @@ if [ $# -eq 1 ] && \
exit
fi
-if [ $# -ne 5 ]; then
+if [ $# -ne 6 ]; then
>&2 printf 'return-assignment: Wrong number of arguments (%s)\n' \
"$#"
>&2 printf 'call either:\n'
>&2 printf ' return-assignment ABORT\n'
- >&2 printf ' return-assignment pkgbase git_revision mod_git_revision repository ERROR\n'
- >&2 printf ' return-assignment pkgbase git_revision mod_git_revision repository sub-pkgrel\n'
- exit 2
+ >&2 printf ' return-assignment pkgbase git_revision mod_git_revision repository arch ERROR\n'
+ >&2 printf ' return-assignment pkgbase git_revision mod_git_revision repository arch sub-pkgrel\n'
+ exit 5
fi
# Create a lock file and a trap.
@@ -71,7 +71,7 @@ clean_up_lock_file() {
trap clean_up_lock_file EXIT
-if [ "$5" = 'ERROR' ]; then
+if [ "$6" = 'ERROR' ]; then
# the build failed on the build slave
# shellcheck disable=SC2016
@@ -83,6 +83,7 @@ if [ "$5" = 'ERROR' ]; then
mysql_join_package_sources_upstream_repositories
mysql_join_build_assignments_binary_packages
mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_build_assignments_architectures
printf ' WHERE `build_slaves`.`id`=from_base64("%s")' \
"$(
# shellcheck disable=SC2154
@@ -95,6 +96,8 @@ if [ "$5" = 'ERROR' ]; then
'mod_git_revision' "$(printf '%s' "$3" | base64 -w0)"
printf ' AND `upstream_repositories`.`name`=from_base64("%s")' \
"$(printf '%s' "$4" | base64 -w0)"
+ printf ' AND `architectures`.`name`=from_base64("%s")' \
+ "$(printf '%s' "$5" | base64 -w0)"
printf ' AND `binary_packages_in_repositories`.`repository`=%s;\n' \
"${repository_ids__any_build_list}"
} | \
@@ -276,6 +279,7 @@ build_assignment_id=$(
mysql_join_package_sources_upstream_repositories
mysql_join_build_assignments_binary_packages
mysql_join_binary_packages_binary_packages_in_repositories
+ mysql_join_build_assignments_architectures
printf ' WHERE `build_slaves`.`id`=from_base64("%s")' \
"$(
# shellcheck disable=SC2154
@@ -300,11 +304,16 @@ build_assignment_id=$(
printf '%s' "$4" | \
base64 -w0
)"
+ printf ' AND `architectures`.`name`=from_base64("%s")' \
+ "$(
+ printf '%s' "$5" | \
+ base64 -w0
+ )"
printf ' AND `binary_packages_in_repositories`.`repository`=%s' \
"${repository_ids__any_build_list}"
printf ' AND `binary_packages`.`sub_pkgrel`=from_base64("%s");\n' \
"$(
- printf '%s' "$5" | \
+ printf '%s' "$6" | \
base64 -w0
)"
} | \