Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-07 22:38:03 +0200
committerErich Eckner <git@eckner.net>2017-10-07 22:38:03 +0200
commitac149ed01c5fc6d36a9f14cb7b3ed0127fd4490b (patch)
tree534c94f3d97366b3f94a9d5182d88d6c8662578c /bin
parentf4490466362c9e7b442f683f5ee1ad0452341240 (diff)
bin/get-package-updates: fix deletion of packages if only patch xor upstream was removed
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-package-updates28
1 files changed, 24 insertions, 4 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 23fba41..96c24f0 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -11,9 +11,6 @@
# TODO: (might be connected to above): find out who deletes loop-files which
# should not be deleted
-# TODO: a package must be deleted in the upstream repository and in the
-# modification repository to get onto the deletion list
-
# TODO: remove extra whitelist cases
# shellcheck source=conf/default.conf
@@ -207,7 +204,30 @@ done | \
# deleted PKGBUILD
"D")
- delete_package "${package}"
+ found_package=false
+ for repository in ${repo_names}; do
+ eval 'repo_path="${repo_paths__'"${repository}"'}"'
+ if [ "${repository}" = "archlinux32" ]; then
+ if git -C "${repo_path}" archive "$(cat "${work_dir}/${repository}.revision")" 2> /dev/null | \
+ tar -t 2> /dev/null | \
+ grep -q "$(str_to_regex "${package}")/PKGBUILD$"; then
+ found_package=true
+ break;
+ fi
+ else
+ if git -C "${repo_path}" archive "$(cat "${work_dir}/${repository}.revision")" -- "${package}/repos" 2> /dev/null | \
+ tar -t --wildcards "${package}/repos/*/PKGBUILD" 2> /dev/null | \
+ cut -d/ -f3 | \
+ grep -v 'staging\|testing\|-unstable' | \
+ grep -vq -- '-i686$'; then
+ found_package=true
+ break;
+ fi
+ fi
+ done
+ if ! ${found_package}; then
+ delete_package "${package}"
+ fi
;;
*)