From bf1a871ccd92586bdb989558433846651e8a434d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 30 Oct 2017 09:30:01 +0100 Subject: bin/why-dont-you: stubbornly_keep new --- bin/why-dont-you | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/bin/why-dont-you b/bin/why-dont-you index 3f86817..8dec6c4 100755 --- a/bin/why-dont-you +++ b/bin/why-dont-you @@ -168,7 +168,16 @@ case "${action}" in ;; - 'keep') + 'keep'|'stubbornly_keep') + + find '/var/lib/pacman/sync' -name '*.db' -execdir bsdtar -tf '{}' \; | \ + sed -n ' + s|-[^-]\+-[^-]\+/$|| + T + p + ' | \ + sort -u > \ + "${tmp_dir}/upstream-packages" while read -r pkg; do @@ -244,6 +253,13 @@ case "${action}" in continue fi + if ! grep -qxF "${pkg}" "${tmp_dir}/upstream-packages"; then + printf 'Package "%s" is not available upstream.\n' "${pkg}" + if [ "${action}" = 'keep' ]; then + continue + fi + fi + if git -C "${repo_paths__archlinux32}" archive "$(cat "${work_dir}/archlinux32.revision")" -- blacklist | \ tar -Ox 'blacklist' | \ sed ' -- cgit v1.2.3-70-g09d2