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-05-31 13:27:18 +0200
committerErich Eckner <git@eckner.net>2018-05-31 13:27:18 +0200
commit8dde526290718371b6da178c65955d431910fd97 (patch)
treeb758ee02e490fa2c1348ff780699a50330bdae03 /bin
parent38839007b3cbcdc91bea10c7e1328a2f12a942af (diff)
fill new columns in `binary_packages_in_repositories`, too
Diffstat (limited to 'bin')
-rwxr-xr-xbin/copy-to-build-support4
-rwxr-xr-xbin/db-update3
-rwxr-xr-xbin/get-package-updates8
-rwxr-xr-xbin/return-assignment4
4 files changed, 12 insertions, 7 deletions
diff --git a/bin/copy-to-build-support b/bin/copy-to-build-support
index a42ca31..addd45c 100755
--- a/bin/copy-to-build-support
+++ b/bin/copy-to-build-support
@@ -126,9 +126,9 @@ sed -n '
# shellcheck disable=SC2016
{
printf 'INSERT IGNORE INTO `binary_packages_in_repositories`'
- printf ' (`repository`,`package`)'
+ printf ' (`repository`,`package`,`is_to_be_deleted`)'
# shellcheck disable=SC2154
- printf ' VALUES (%s,%s);\n' \
+ printf ' VALUES (%s,%s,0);\n' \
"${repository_ids__i686_build_support}" \
"${id}"
printf 'SELECT LAST_INSERT_ID();\n'
diff --git a/bin/db-update b/bin/db-update
index ae79389..4834a1d 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -411,7 +411,8 @@ for source_stability in 'testing' 'staging'; do
printf ' JOIN `moved_binary_packages` ON `binary_packages`.`id`=`moved_binary_packages`.`id`'
mysql_join_binary_packages_binary_packages_in_repositories
printf ' SET `binary_packages_in_repositories`.`repository`=`moved_binary_packages`.`new_repository`,'
- printf '`binary_packages`.`last_moved`=NOW()'
+ printf '`binary_packages`.`last_moved`=NOW(),'
+ printf '`binary_packages_in_repositories`.`last_moved`=NOW()'
printf ' WHERE `binary_packages_in_repositories`.`repository`!=`moved_binary_packages`.`new_repository`;\n'
} | \
mysql_run_query
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 34e9753..6c4c5f9 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -128,9 +128,13 @@ delete_package() {
mysql_join_binary_packages_build_assignments
mysql_join_build_assignments_package_sources
mysql_join_binary_packages_binary_packages_in_repositories
+ printf ' SET '
# shellcheck disable=SC2154
- printf ' SET `binary_packages_in_repositories`.`repository`=%s' \
- "${repository_ids__any_deletion_list}"
+ printf '`binary_packages_in_repositories`.`%s`=%s,' \
+ 'repository' "${repository_ids__any_deletion_list}" \
+ 'is_to_be_deleted' '1' \
+ 'last_moved' 'NOW()' | \
+ sed 's/,$//'
# shellcheck disable=SC2154
printf ' WHERE `binary_packages_in_repositories`.`repository` in (%s,%s)' \
"${repository_ids__any_build_list}" \
diff --git a/bin/return-assignment b/bin/return-assignment
index 2df6ad6..0488a7d 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -602,8 +602,8 @@ trigger_mirror_refreshs
# insert into appropriate repositories and retrieve ids
while read -r package_id _; do
- printf 'INSERT INTO `binary_packages_in_repositories` (`package`,`repository`) VALUES '
- printf '(%s,%s);\n' \
+ printf 'INSERT INTO `binary_packages_in_repositories` (`package`,`repository`,`is_to_be_deleted`) VALUES '
+ printf '(%s,%s,0);\n' \
"${package_id}" "${destination_id}"
printf 'SELECT LAST_INSERT_ID();\n'
done < \