From 68e1821446ecbd08b1c5b92a52d301040e1cd2a9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 6 Jun 2017 09:21:44 +0200 Subject: bin/build-master-status: add statistics about loops --- bin/build-master-status | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bin/build-master-status') diff --git a/bin/build-master-status b/bin/build-master-status index 61eef0d..4648c6c 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -20,11 +20,26 @@ broken="$( ls "${work_dir}/package-states/" | \ grep -c '\.broken$' )" +loops="$( + ls "${work_dir}/build-list.loops" | \ + grep -c '^loop_[0-9]\+$' + )" +looped_packages="$( + ls "${work_dir}/build-list.loops" | \ + grep '^loop_[0-9]\+$' | \ + sed "s|^|${work_dir}/build-list.loops/|" | \ + xargs -r cat | \ + sort -u | \ + wc -l + )" printf 'The mirror master contains %d stable packages (vs. ca. %d planned).\n' "${stable}" "$[${staging}+${tasks}]" printf 'The build list contains %d tasks (incl. broken: %d).\n' "$[${tasks}-${broken}]" "${tasks}" printf 'There are %d testing/staging packages.\n' "${staging}" printf 'There are %d broken packages.\n' "${broken}" +if [ "${loops}" -ne 0 ]; then + printf 'There are %d loops containing %d packages.\n' "${loops}" "${looped_packages}" +fi if [ $[${broken}+${staging}] -ne 0 ]; then printf '%.1f%% of all packages are broken.\n' "$(bc <<< "scale=10; 100*${broken}/(${broken}+${staging})")" fi -- cgit v1.2.3-70-g09d2