summaryrefslogtreecommitdiff
path: root/bin/why_dont_you
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-03 14:27:30 +0200
committerErich Eckner <git@eckner.net>2017-07-03 14:27:30 +0200
commit7f1b05846122571fadb3cb09a077710d45d5356c (patch)
tree2b17357ddd01e4e18b98eaca9ccf8e2b58a6b413 /bin/why_dont_you
parent7595e2dfc796d03550ea62b602e985c4ab7ceba4 (diff)
downloadbuilder-7f1b05846122571fadb3cb09a077710d45d5356c.tar.xz
bin/why_dont_you: be more detailed why something is un-unstageable
Diffstat (limited to 'bin/why_dont_you')
-rwxr-xr-xbin/why_dont_you21
1 files 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