summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-23 10:07:08 +0100
committerErich Eckner <git@eckner.net>2017-11-23 10:07:08 +0100
commit4d464124cb231a27f8419e05eb490f2fa1529db2 (patch)
tree6faadbb4dea1bdd039eb13621a5fdd2bca350c3d /bin
parent5ed7e381063e5a784ef2c31d997e022888d45650 (diff)
downloadbuilder-4d464124cb231a27f8419e05eb490f2fa1529db2.tar.xz
bin/why-dont-you build: be more verbose about blocked/locked reason
Diffstat (limited to 'bin')
-rwxr-xr-xbin/why-dont-you27
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