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>2024-08-28 20:29:39 +0200
committerErich Eckner <git@eckner.net>2024-08-28 20:29:39 +0200
commit06d3fb3ea3b0f34b00b4775eef0e8bdf6bed8793 (patch)
treeedc99239ecbb1d949e659aeab33c49524862a3d5
parent13fc48eb6d0093d27e92cd28a15302ce4c5a4fb9 (diff)
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)
-rwxr-xr-xbin/get-package-updates49
1 files changed, 33 insertions, 16 deletions
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