summaryrefslogtreecommitdiff
path: root/bin/modify-package-state
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-12 22:14:54 +0100
committerErich Eckner <git@eckner.net>2018-02-12 22:14:54 +0100
commitf8d86b4fc47530ddb67819b00572a758d0c72789 (patch)
tree36fd752ccc3fed801b2572cf8daa030e6f5b1d6e /bin/modify-package-state
parenta117834a6497ca868caa3943dd7275ad532e9d5a (diff)
downloadbuilder-f8d86b4fc47530ddb67819b00572a758d0c72789.tar.xz
bin/modify-package-state: mark all parts of a split package as "tested" (for now)
Diffstat (limited to 'bin/modify-package-state')
-rwxr-xr-xbin/modify-package-state16
1 files changed, 15 insertions, 1 deletions
diff --git a/bin/modify-package-state b/bin/modify-package-state
index 0703238..b2d3133 100755
--- a/bin/modify-package-state
+++ b/bin/modify-package-state
@@ -230,7 +230,21 @@ while read -r package reason; do
${mysql_command} --raw --batch | \
sed '1d' | \
grep -qxF '1'; then
- printf 'UPDATE %s SET %s %s' "${combiner}" "${modifier}" "${selector}" | \
+ # shellcheck disable=SC2016
+ {
+ printf 'UPDATE %s SET %s %s' "${combiner}" "${modifier}" "${selector}"
+ printf ';\n'
+ # TODO: remove the below part, once the database if fully functional
+ printf 'UPDATE `binary_packages` AS `a`'
+ printf ' JOIN `binary_packages` AS `b`'
+ printf ' ON `a`.`build_assignment`=`b`.`build_assignment`'
+ printf ' JOIN `repositories`'
+ printf ' ON `b`.`repository`=`repositories`.`id`'
+ printf ' SET `b`.`is_tested`=1'
+ printf ' WHERE `a`.`is_tested`'
+ printf ' AND NOT `b`.`is_tested`'
+ printf ' AND NOT `repositories`.`name`="deletion-list";\n'
+ } | \
${mysql_command}
case "${action}" in
'block')