From 0b9304e309a4da488d6fa6686ebbd2326b988b33 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 6 Nov 2017 15:28:28 +0100 Subject: bin/why-dont-you unstage/stabilize: adopt to new dependency check rules --- bin/why-dont-you | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/why-dont-you b/bin/why-dont-you index 9656dfd..5367085 100755 --- a/bin/why-dont-you +++ b/bin/why-dont-you @@ -100,6 +100,20 @@ case "${action}" in sort -k2,2 > \ "${tmp_dir}/all-run-depends" + cat "${tmp_dir}/moveable-list" "${tmp_dir}/unmoveable-list" | \ + sed ' + s|^|'"${work_dir}/package-infos/"'| + s|$|.builds| + ' | \ + # base is boring, so we ignore it (might give result "... can be unstaged" although it _will_not_ be unstaged! + xargs -r grep -vHxF 'base' | \ + sed ' + s|^[^:]*/|| + s|\.builds:| | + ' | \ + sort -k2,2 > \ + "${tmp_dir}/all-builds" + for pkg in "$@"; do if ! state_file=$( @@ -118,13 +132,22 @@ case "${action}" in sort -u | \ sponge "${tmp_dir}/dependent" - sed ' - s|^|'"${work_dir}"'/package-infos/| - s|$|.builds| - ' "${tmp_dir}/dependent.new" | \ - xargs -r cat | \ - sort -u | \ - join -1 1 -2 2 -o 2.1 - "${tmp_dir}/all-run-depends" | \ + { + sed ' + s|^|'"${work_dir}"'/package-infos/| + s|$|.builds| + ' "${tmp_dir}/dependent.new" | \ + xargs -r cat | \ + sort -u | \ + join -1 1 -2 2 -o 2.1 - "${tmp_dir}/all-run-depends" + sed ' + s|^|'"${work_dir}"'/package-infos/| + s|$|.run-depends| + ' "${tmp_dir}/dependent.new" | \ + xargs -r cat | \ + sort -u | \ + join -1 1 -2 2 -o 2.1 - "${tmp_dir}/all-builds" + } | \ sort -u | \ sponge "${tmp_dir}/dependent.new" -- cgit v1.2.3-70-g09d2