summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-30 09:30:01 +0100
committerErich Eckner <git@eckner.net>2017-10-30 09:30:01 +0100
commitbf1a871ccd92586bdb989558433846651e8a434d (patch)
tree61705d4a2d1e4dc180c427563abc59d145afce28
parent84469b4c69a1ba9d769c58fd5c75238ec968c62e (diff)
downloadbuilder-bf1a871ccd92586bdb989558433846651e8a434d.tar.xz
bin/why-dont-you: stubbornly_keep new
-rwxr-xr-xbin/why-dont-you18
1 files changed, 17 insertions, 1 deletions
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 '