From 06d3fb3ea3b0f34b00b4775eef0e8bdf6bed8793 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 28 Aug 2024 20:29:39 +0200 Subject: bin/get-package-updates: do not delete already deleted packages again * this just makes get-package-updates slow * it should not be necessary to delete them (again) --- bin/get-package-updates | 49 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) (limited to 'bin') diff --git a/bin/get-package-updates b/bin/get-package-updates index 60879f3..92095d6 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -465,23 +465,40 @@ done \ echo 'remove blacklisted packages' { - git -C "${repo_paths__archlinux32}" archive "${new_repo_revisions__archlinux32}" -- 'blacklist' \ - | tar -t 'blacklist' \ - | sed ' - s@^blacklist/\([^/]\+\)/[^/]\+/\([^/]\+\)$@\1 \2@ - t - d - ' \ - | sort -k2,2 \ - | join -1 1 -2 2 -o 2.1,2.2 "${tmp_dir}/modified-packages" - - git -C "${repo_paths__archlinux32}" diff --name-status "${old_repo_revisions__archlinux32}" "${new_repo_revisions__archlinux32}" -- 'blacklist' \ - | sed ' - s@^[AM]\sblacklist/\([^/]\+\)/[^/]\+/\([^/]\+\)$@\1 \2@ - t - d - ' + { + git -C "${repo_paths__archlinux32}" archive "${new_repo_revisions__archlinux32}" -- 'blacklist' \ + | tar -t 'blacklist' \ + | sed ' + s@^blacklist/\([^/]\+\)/[^/]\+/\([^/]\+\)$@\1 \2@ + t + d + ' \ + | sort -k2,2 \ + | join -1 1 -2 2 -o 2.1,2.2 "${tmp_dir}/modified-packages" - + git -C "${repo_paths__archlinux32}" diff --name-status "${old_repo_revisions__archlinux32}" "${new_repo_revisions__archlinux32}" -- 'blacklist' \ + | sed ' + s@^[AM]\sblacklist/\([^/]\+\)/[^/]\+/\([^/]\+\)$@\1 \2@ + t + d + ' + } \ + | sort -u + { + printf 'SELECT `architectures`.`name`,' + printf '`package_sources`.`pkgbase`' + printf ' FROM `binary_packages`' + mysql_join_binary_packages_binary_packages_in_repositories + mysql_join_binary_packages_build_assignments + mysql_join_build_assignments_package_sources + mysql_join_build_assignments_architectures + printf ' WHERE `binary_packages_in_repositories`.`is_to_be_deleted`' + } \ + | mysql_run_query \ + | tr '\t' ' ' \ + | sed 'p' } \ -| sort -u \ +| sort \ +| uniq -u \ | while read -r arch pkgbase; do delete_package "${arch}" "${pkgbase}" '%' done -- cgit v1.2.3-70-g09d2