From 4d464124cb231a27f8419e05eb490f2fa1529db2 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 23 Nov 2017 10:07:08 +0100 Subject: bin/why-dont-you build: be more verbose about blocked/locked reason --- bin/why-dont-you | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'bin/why-dont-you') diff --git a/bin/why-dont-you b/bin/why-dont-you index 5367085..cc9bddf 100755 --- a/bin/why-dont-you +++ b/bin/why-dont-you @@ -24,8 +24,31 @@ case "${action}" in } | \ while read -r package git_revision mod_git_revision repository; do - if package_locked_or_blocked "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"; then - printf '"%s" is locked or blocked\n' "${pkg}" + if [ -f "${work_dir}/package-states/$1.$2.$3.$4.locked" ]; then + printf '"%s" is locked by ' "$1" + sort -u < \ + "${work_dir}/package-states/$1.$2.$3.$4.locked" \ + sed ' + :a + $!{ + N + s/\n/, / + ba + } + s/$/./ + ' + continue + fi + if [ -f "${work_dir}/package-states/$1.$2.$3.$4.blocked" ]; then + printf '"%s" is blocked: "' "${pkg}" + tr '[:space:]' ' ' < \ + "${work_dir}/package-states/$1.$2.$3.$4.blocked" | \ + sed ' + s| \+| | + s|^ || + s| $|| + ' + printf '"\n' continue fi -- cgit v1.2.3-70-g09d2