summaryrefslogtreecommitdiff
path: root/bin/why-dont-you
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-12 11:22:40 +0200
committerErich Eckner <git@eckner.net>2018-09-12 11:22:40 +0200
commit242f91330dc780dffa485226990f7f7f726199cc (patch)
treee4ae81242a317f354f64807232bef1362666d041 /bin/why-dont-you
parent9b9b8eb72586ce7d5890b78c9fd67b1da3acb474 (diff)
downloadbuilder-242f91330dc780dffa485226990f7f7f726199cc.tar.xz
bin/why-dont-you: separate by build_assignments.architecture, too
Diffstat (limited to 'bin/why-dont-you')
-rwxr-xr-xbin/why-dont-you38
1 files changed, 26 insertions, 12 deletions
diff --git a/bin/why-dont-you b/bin/why-dont-you
index 5c6e08a..da590aa 100755
--- a/bin/why-dont-you
+++ b/bin/why-dont-you
@@ -35,6 +35,7 @@ case "${action}" in
sed 's/,$/;\n/'
# we select everything which is possibly of any interest:
# - id (to see if it actually is on the build-list
+ # - build_assignments.architecture.name
# - to_build.is_broken
# - failed_builds_count
# - to_build.is_blocked
@@ -42,6 +43,7 @@ case "${action}" in
# - build_slaves.name (is anyone building this?)
# - pkgbase
printf 'SELECT DISTINCT `to_build`.`ba_id`,'
+ printf '`to_build`.`baa_name`,'
printf 'If(`to_build`.`is_broken`,1,0),'
printf '('
printf 'SELECT COUNT(1) FROM `failed_builds`'
@@ -58,13 +60,20 @@ case "${action}" in
printf '('
# join the tables for the to-be-built packages:
# package_source, build_assignment, binary_package, repostory
- printf 'SELECT DISTINCT `tb_ps`.`pkgbase`,`tb_bin`.`id` AS `bin_id`,`tb_ba`.`id` AS `ba_id`,`tb_ba`.`is_blocked`,`tb_ba`.`is_broken`'
+ printf 'SELECT DISTINCT '
+ printf '`tb_ps`.`pkgbase`,'
+ printf '`tb_bin`.`id` AS `bin_id`,'
+ printf '`tb_ba`.`id` AS `ba_id`,'
+ printf '`tb_ba`.`is_blocked`,'
+ printf '`tb_ba`.`is_broken`,'
+ printf '`tb_baa`.`name` AS `baa_name`'
printf ' FROM `package_sources` AS `tb_ps`'
mysql_join_package_sources_build_assignments 'tb_ps' 'tb_ba'
+ mysql_join_build_assignments_architectures 'tb_ba' 'tb_baa'
mysql_join_build_assignments_binary_packages 'tb_ba' 'tb_bin'
mysql_join_binary_packages_binary_packages_in_repositories 'tb_bin' 'tb_bir'
- mysql_join_binary_packages_in_repositories_repositories 'tb_bir' 'tb_rep'
- printf ' WHERE `tb_rep`.`name`="build-list"'
+ printf ' WHERE `tb_bir`.`repository`=%s' \
+ "${repository_ids__any_build_list}"
printf ') AS `to_build`'
printf ' ON `to_build`.`pkgbase`=`pkgbases`.`pkgbase`'
printf ' LEFT JOIN '
@@ -92,19 +101,19 @@ case "${action}" in
} | \
mysql_run_query | \
tr '\t' ' ' | \
- sort -k7,7 -k6,6 -k5,5 | \
+ sort -k8,8 -k7,7 -k6,6 | \
sed '
/ NULL \S\+$/ b multi-dep
:multi-slave
$!N
- s/^\(\(\S\+ \)\{5\}\)\(\S\+\)\( \S\+\)\n\(\S\+ \)\{5\}\(\S\+\)\4/\1\3,\6\4/
+ s/^\(\(\S\+ \)\{6\}\)\(\S\+\)\( \S\+\)\n\(\S\+ \)\{6\}\(\S\+\)\4/\1\3,\6\4/
t multi-slave
P
D
:multi-dep
/ NULL\( \S\+\)\{3\}$/! b
$!N
- s/^\(\(\S\+ \)\{4\}\)\(\S\+\)\(\( \S\+\)\{2\}\)\n\(\S\+ \)\{4\}\(\S\+\)\4/\1\3,\7\4/
+ s/^\(\(\S\+ \)\{5\}\)\(\S\+\)\(\( \S\+\)\{2\}\)\n\(\S\+ \)\{5\}\(\S\+\)\4/\1\3,\7\4/
t multi-dep
P
D
@@ -112,7 +121,7 @@ case "${action}" in
sed '
s/NULL,//g
' | \
- while read -r id is_broken trials is_blocked dependency slave pkgbase; do
+ while read -r id ba_arch is_broken trials is_blocked dependency slave pkgbase; do
pkgbase=$(
printf '%s' "${pkgbase}" | \
base64 -d
@@ -124,7 +133,8 @@ case "${action}" in
fi
if [ "${slave}" != 'NULL' ]; then
# beware: A slave named "5BË" will look exactly like this!
- printf '"%s" is locked by %s.\n' \
+ printf '"%s/%s" is locked by %s.\n' \
+ "${ba_arch}" \
"${pkgbase}" \
"$(
printf '%s\n' "${slave}" | \
@@ -140,7 +150,8 @@ case "${action}" in
fi
if [ "${is_blocked}" != 'NULL' ]; then
# beware: A block-reason "5BË" will look exactly like this!
- printf '"%s" is blocked: "%s".\n' \
+ printf '"%s/%s" is blocked: "%s".\n' \
+ "${ba_arch}" \
"${pkgbase}" \
"$(
printf '%s' "${is_blocked}" | \
@@ -149,7 +160,8 @@ case "${action}" in
continue
fi
if [ "${dependency}" != 'NULL' ]; then
- printf '"%s" has unmet dependencies:\n' \
+ printf '"%s/%s" has unmet dependencies:\n' \
+ "${ba_arch}" \
"${pkgbase}"
printf '%s\n' "${dependency}" | \
tr ',' '\n' | \
@@ -162,12 +174,14 @@ case "${action}" in
continue
fi
if [ "${is_broken}" = '1' ]; then
- printf '"%s" is broken (%sx built), but would be built.\n' \
+ printf '"%s/%s" is broken (%sx built), but would be built.\n' \
+ "${ba_arch}" \
"${pkgbase}" \
"${trials}"
continue
fi
- printf '"%s" would be built.\n' \
+ printf '"%s/%s" would be built.\n' \
+ "${ba_arch}" \
"${pkgbase}"
done