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>2018-03-12 11:40:07 +0100
committerErich Eckner <git@eckner.net>2018-03-12 11:40:07 +0100
commite40900974a9671651e0b18f4c9367e498157814c (patch)
tree2f0984e797b03e95b9ff009ee7704c8a00af5023
parent4ad43a2e5edb2625291e8b0da893ddad42bb2830 (diff)
bin/get-package-updates: only put packages on the deletion-list which are known in the database
-rwxr-xr-xbin/get-package-updates11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 0276b7e..b48660d 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -99,7 +99,16 @@ fi
# delete_package package
# mark $package for deletion
delete_package() {
- echo "$1" >> \
+ # shellcheck disable=SC2016
+ {
+ printf 'SELECT DISTINCT `package_sources`.`pkgbase`'
+ printf ' FROM `package_sources`'
+ mysql_join_package_sources_build_assignments
+ mysql_join_build_assignments_binary_packages
+ printf ' WHERE `package_sources`.`pkgbase`=from_base64("%s")' \
+ "$(printf '%s' "$1" | base64 -w0)"
+ } | \
+ mysql_run_query >> \
"${work_dir}/deletion-list.new"
sed -i "/^$(str_to_regex "${1}") /d" "${work_dir}/build-list.new"
find "${work_dir}/package-states" -maxdepth 1 -mindepth 1 -regextype grep \