summaryrefslogtreecommitdiff
path: root/bin/build-master-status
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-18 12:36:56 +0100
committerErich Eckner <git@eckner.net>2017-11-18 12:36:56 +0100
commit7a73178c391c6e2df2f2b2ae99a45a877195e0fa (patch)
treebf2a66226921e0630b1087271c754bd3695c4691 /bin/build-master-status
parentf923c6d5dfac3e94ad467992e246126699546dbb (diff)
downloadbuilder-7a73178c391c6e2df2f2b2ae99a45a877195e0fa.tar.xz
bin/build-master-status: do not query locally accessable information from the master mirror
Diffstat (limited to 'bin/build-master-status')
-rwxr-xr-xbin/build-master-status27
1 files changed, 10 insertions, 17 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
index 5390b13..a154ab5 100755
--- a/bin/build-master-status
+++ b/bin/build-master-status
@@ -5,9 +5,6 @@
# shellcheck source=conf/default.conf
. "${0%/*}/../conf/default.conf"
-# TODO: Do not extract infos available on the buildmaster from
-# the master mirror
-
# TODO: Count tested packages.
usage() {
@@ -108,21 +105,17 @@ next_tasks=$(
wc -l
)
staging=$(
- ls_master_mirror 'i686' | \
- grep 'staging$' | \
- while read -r dir; do
- ls_master_mirror "i686/${dir}"
- done | \
- grep -c '\.pkg\.tar\.xz$'
-) || true
+ find "${work_dir}/package-states" -name '*.done' \
+ -exec cat '{}' \; | \
+ sort -u | \
+ wc -l
+)
testing=$(
- ls_master_mirror 'i686' | \
- grep 'testing$' | \
- while read -r dir; do
- ls_master_mirror "i686/${dir}"
- done | \
- grep -c '\.pkg\.tar\.xz$'
-) || true
+ find "${work_dir}/package-states" \( -name '*.testing' -o -name '*.tested' \) \
+ -exec cat '{}' \; | \
+ sort -u | \
+ wc -l
+)
{
find "${work_dir}/package-states/" -maxdepth 1 -name '*.broken' -printf '%f\n' | \
sed 's|\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\.[^.]\+$| \1 \2 \3|' | \