Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-05-24 14:04:48 +0200
committerErich Eckner <git@eckner.net>2019-05-24 14:04:48 +0200
commit2b0f8d0f534040e85c1c51b9bf0cf6d635d43714 (patch)
tree453949462a5e5c52efc3bd4537733dfbf224b107
parentf103d6fd9874a13f416e0cb729a94f28f9674af1 (diff)
bin/db-update: show names instead of ids for nothing-to-do repository-stability combinations
-rwxr-xr-xbin/db-update20
1 files changed, 12 insertions, 8 deletions
diff --git a/bin/db-update b/bin/db-update
index edb421b..52111e7 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -164,8 +164,12 @@ export TMPDIR="${tmp_dir}"
{
printf 'SELECT DISTINCT'
printf ' `repositories`.`architecture`,'
- printf '`repositories`.`stability`'
+ printf '`architectures`.`name`,'
+ printf '`repositories`.`stability`,'
+ printf '`repository_stabilities`.`name`'
printf ' FROM `repositories`'
+ mysql_join_repositories_architectures
+ mysql_join_repositories_repository_stabilities
printf ' JOIN `repository_moves`'
printf ' ON `repository_moves`.`from_repository`=`repositories`.`id`'
printf ' WHERE `repositories`.`is_on_master_mirror`'
@@ -180,7 +184,7 @@ export TMPDIR="${tmp_dir}"
printf ')'
} | \
mysql_run_query | \
- while read -r arch_id source_stability; do
+ while read -r arch_id arch source_stability_id source_stability; do
find "${tmp_dir}" -xdev -mindepth 1 -delete
{
@@ -216,7 +220,7 @@ export TMPDIR="${tmp_dir}"
mysql_join_binary_packages_in_repositories_binary_packages
mysql_join_binary_packages_in_repositories_repositories
printf ' WHERE `repositories`.`stability`!=%s' \
- "${source_stability}"
+ "${source_stability_id}"
printf ' OR `repositories`.`architecture`!=%s;\n' \
"${arch_id}"
printf 'UPDATE `moveable_bpir`'
@@ -258,7 +262,7 @@ export TMPDIR="${tmp_dir}"
mysql_join_binary_packages_in_repositories_binary_packages 'new_bpir' 'new_bp'
mysql_join_binary_packages_in_repositories_repositories 'new_bpir' 'from_r'
printf ' AND `from_r`.`stability`=%s' \
- "${source_stability}"
+ "${source_stability_id}"
printf ' AND `from_r`.`architecture`=%s' \
"${arch_id}"
printf ' AND `from_r`.`is_on_master_mirror`'
@@ -329,7 +333,7 @@ export TMPDIR="${tmp_dir}"
mysql_join_binary_packages_in_repositories_repositories
printf ' AND `repositories`.`is_on_master_mirror`'
printf ' AND `repositories`.`stability`=%s' \
- "${source_stability}"
+ "${source_stability_id}"
printf ' AND `repositories`.`architecture`=%s' \
"${arch_id}"
mysql_join_binary_packages_build_assignments
@@ -351,7 +355,7 @@ export TMPDIR="${tmp_dir}"
else
printf 'CALL calculate_maximal_moveable_set(%s,%s);\n' \
"${arch_id}" \
- "${source_stability}"
+ "${source_stability_id}"
fi
printf 'CREATE TEMPORARY TABLE `rps` (`id` MEDIUMINT, UNIQUE INDEX (`id`));\n'
@@ -418,8 +422,8 @@ export TMPDIR="${tmp_dir}"
done
if [ ! -s "${tmp_dir}/repositories" ]; then
- >&2 printf 'Nothing to move here (%s,%s).\n' \
- "${arch_id}" \
+ >&2 printf 'Nothing to move here (from %s/%s).\n' \
+ "${arch}" \
"${source_stability}"
continue
fi