From 19d293888b4746f130e451c2c947ce715da4abba Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 14 Feb 2020 10:58:22 +0100 Subject: bin/why-dont-you: show search term in case of not-found package --- bin/why-dont-you | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/why-dont-you b/bin/why-dont-you index a052fff..1f4916b 100755 --- a/bin/why-dont-you +++ b/bin/why-dont-you @@ -34,6 +34,7 @@ case "${action}" in ) | \ sed 's/,$/;\n/' # we select everything which is possibly of any interest: + # - search term # - id (to see if it actually is on the build-list) # - build_assignments.architecture.name # - to_build.is_broken @@ -42,7 +43,8 @@ case "${action}" in # - deps.pkgbase (any dependency pending?) # - build_slaves.name (is anyone building this?) # - pkgbase - printf 'SELECT DISTINCT `to_build`.`ba_id`,' + printf 'SELECT DISTINCT replace(to_base64(`searches`.`search`),"\\n","")' + printf '`to_build`.`ba_id`,' printf '`to_build`.`baa_name`,' printf 'If(`to_build`.`is_broken`,1,0),' printf '(' @@ -105,7 +107,7 @@ case "${action}" in } | \ mysql_run_query 'unimportant' | \ tr '\t' ' ' | \ - sort -k8,8 -k7,7 -k6,6 | \ + sort -k9,9 -k8,8 -k7,7 | \ sed ' / NULL \S\+$/ b multi-dep :multi-slave @@ -125,14 +127,18 @@ case "${action}" in sed ' s/NULL,//g ' | \ - while read -r id ba_arch is_broken trials is_blocked dependency slave pkgbase; do + while read -r search id ba_arch is_broken trials is_blocked dependency slave pkgbase; do + search=$( + printf '%s' "${search}" | \ + base64 -d + ) pkgbase=$( printf '%s' "${pkgbase}" | \ base64 -d ) if [ "${id}" = 'NULL' ]; then >&2 printf '"%s" is not on the build list.\n' \ - "${pkgbase}" + "${search}" continue fi if [ "${slave}" != 'NULL' ]; then -- cgit v1.2.3