Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-14 11:05:36 +0200
committerErich Eckner <git@eckner.net>2017-06-14 11:05:36 +0200
commitf94f8508e646f08968f688618f291101bc00427f (patch)
treece6a27ac0970bfb47fa9c22764fd8dede813170c
parent5a998643a4e8437019c5f1bb682aaa09d8a0baef (diff)
bin/build-master-status: minor improvements
-rwxr-xr-xbin/build-master-status26
1 files changed, 18 insertions, 8 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
index a3fcb5e..85e65f7 100755
--- a/bin/build-master-status
+++ b/bin/build-master-status
@@ -12,8 +12,17 @@ tasks="$(
wc -l < \
"${work_dir}/build-list"
)"
+pending_packages="$(
+ sed '
+ s| |.|g
+ s|^|'"${work_dir}"'/package-infos/|
+ s|\.[^.]\+$|.packages|
+ ' "${work_dir}"/build-list | \
+ xargs -r cat | \
+ wc -l
+)"
staging="$(
- find "${master_mirror_directory}/i686/staging" -name '*.pkg.tar.xz' | \
+ find "${master_mirror_directory}/i686/"*staging -name '*.pkg.tar.xz' | \
wc -l
)"
testing="$(
@@ -39,17 +48,18 @@ looped_packages="$(
printf 'The mirror master contains %d stable packages (vs. ca. %d planned).\n' \
"${stable}" \
- "$[${staging}+${testing}+${tasks}]"
-printf 'The build list contains %d tasks (incl. broken: %d).\n' \
+ "$[${staging}+${testing}+${pending_packages}]"
+printf 'The build list contains %d tasks (incl. broken: %d, leading to %d packages).\n' \
"$[${tasks}-${broken}]" \
- "${tasks}"
+ "${tasks}" \
+ "${pending_packages}"
printf 'There are %d testing and %d staging packages.\n' \
"${testing}" \
"${staging}"
-printf 'There are %d broken packages.\n' \
+printf 'There are %d broken package builds.\n' \
"${broken}"
if [ "${loops}" -ne 0 ]; then
- printf 'There are %d loops containing %d packages.\n' \
+ printf 'There are %d loops containing %d package builds.\n' \
"${loops}" \
"${looped_packages}"
fi
@@ -57,7 +67,7 @@ if [ $[${broken}+${testing}+${staging}] -ne 0 ]; then
printf '%.1f%% of all packages are broken.\n' \
"$(bc <<< "scale=10; 100*${broken}/(${broken}+${testing}+${staging})")"
fi
-if [ $[${testing}+${staging}+${tasks}-${broken}] -ne 0 ]; then
+if [ $[${testing}+${staging}+${pending_packages}-${broken}] -ne 0 ]; then
printf '%.1f%% of the planned work has been done.\n' \
- "$(bc <<< "scale=10; 100*(${testing}+${staging})/(${testing}+${staging}+${tasks}-${broken})")"
+ "$(bc <<< "scale=10; 100*(${testing}+${staging})/(${testing}+${staging}+${pending_packages}-${broken})")"
fi