Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-master-status
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-02 10:52:26 +0200
committerErich Eckner <git@eckner.net>2017-06-02 10:53:15 +0200
commit9adb204b5a81f5ed4098fbb1f56aea41ba7a2c00 (patch)
treed120d55ccbfc76f3f56876e1d1280e6b81ef7414 /bin/build-master-status
parent538b87e91cd880f81fbba4f4ad46135eef6aa695 (diff)
bin/build-master-status new
Diffstat (limited to 'bin/build-master-status')
-rwxr-xr-xbin/build-master-status30
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
new file mode 100755
index 0000000..11f3957
--- /dev/null
+++ b/bin/build-master-status
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# report about status of build master
+
+. "${0%/*}/../conf/default.conf"
+
+stable="$(
+ find "${master_mirror_directory}/i686/" \( -name '*testing' -o -name '*staging' \) -prune -o -name '*.pkg.tar.xz' -print | \
+ wc -l
+ )"
+tasks="$(
+ wc -l < \
+ "${work_dir}/build-list"
+ )"
+staging="$(
+ find "${master_mirror_directory}/i686/"*{testing,staging} -name '*.pkg.tar.xz' | \
+ wc -l
+ )"
+broken="$(
+ ls "${work_dir}/package-states/" | \
+ grep -c '\.broken$'
+ )"
+
+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 [ $[${broken}+${staging}] -ne 0 ]; then
+ LANG=C printf '%.1f%% of all packages are broken.\n' "$(bc <<< "scale=10; 100*${broken}/(${broken}+${staging})")"
+fi