From f5d6482afab7c69ec6ec6a08868bb06ac86d28c9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 22 May 2023 14:39:29 +0200 Subject: simplify check for deletion * do not archive the whole repository * this should hopefully be faster --- bin/get-package-updates | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'bin/get-package-updates') diff --git a/bin/get-package-updates b/bin/get-package-updates index a4c273d..bbf5a4a 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -197,17 +197,11 @@ check_if_package_should_be_deleted() { if git -C "${repo_paths__archlinux32}" archive "${new_repo_revisions__archlinux32}" -- "${repository}/${pkgbase}" >/dev/null 2>&1; then return 1 fi - if git -C "${repo_paths__state}" archive "${new_repo_revisions__state}" \ - | tar -t \ - | tr '/' ' ' \ - | cut -d' ' -f1,2 \ - | sort -k2,2 \ - | join -1 2 -2 1 - <(echo "${pkgbase}") \ - | cut -d' ' -f1 \ - | sed 's@-[^-]\+$@@' \ - | grep -qxF "${repository}"; then - return 1 - fi + for considered_architecture in 'any' 'x86_64'; do + if git -C "${repo_paths__state}" archive "${new_repo_revisions__state}" -- "${repository}-${considered_architecture}/${pkgbase}" >/dev/null 2>&1; then + return 1 + fi + done return 0 } -- cgit v1.2.3-70-g09d2