summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
Diffstat (limited to 'bin/get-package-updates')
-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 \