diff options
author | Erich Eckner <git@eckner.net> | 2017-11-23 10:07:08 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-11-23 10:07:08 +0100 |
commit | 4d464124cb231a27f8419e05eb490f2fa1529db2 (patch) | |
tree | 6faadbb4dea1bdd039eb13621a5fdd2bca350c3d | |
parent | 5ed7e381063e5a784ef2c31d997e022888d45650 (diff) | |
download | builder-4d464124cb231a27f8419e05eb490f2fa1529db2.tar.xz |
bin/why-dont-you build: be more verbose about blocked/locked reason
-rwxr-xr-x | bin/why-dont-you | 27 |
1 files changed, 25 insertions, 2 deletions
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 |