From 7f1b05846122571fadb3cb09a077710d45d5356c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 3 Jul 2017 14:27:30 +0200 Subject: bin/why_dont_you: be more detailed why something is un-unstageable --- bin/why_dont_you | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/bin/why_dont_you b/bin/why_dont_you index ba43408..2d28f85 100755 --- a/bin/why_dont_you +++ b/bin/why_dont_you @@ -65,6 +65,7 @@ case "${action}" in ' done | \ sort -u + printf '\n' continue fi @@ -125,11 +126,27 @@ case "${action}" in if [ -n "${dependent_still_on_build_list}" ]; then printf 'The following packages are dependent on "%s", but still on the build list:\n' "${pkg}" echo "${dependent_still_on_build_list}" + printf '\n' continue fi - printf 'No dependencies left on build list for "%s".\n' "${pkg}" - echo "${dependent_packages}" + dependent_still_in_staging="$( + echo "${dependent_packages}" | \ + while read -r sf; do + if [ -f "${work_dir}/package-states/$sf."*".done" ]; then + echo "${sf}" + fi + done + )" + + if [ -n "${dependent_still_in_staging}" ]; then + printf 'The following packages are dependent on "%s" and still in staging - maybe they cannot be unstaged:\n' "${pkg}" + echo "${dependent_still_in_staging}" + printf '\n' + continue + fi + + printf 'Package "%s" can be unstaged.\n' "${pkg}" done -- cgit v1.2.3-54-g00ecf