From c690de69ca33398530e8f00823538baf0d928d87 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 13 Jun 2018 11:32:18 +0200 Subject: bin/prioritize-build-list: work with pipes, too --- bin/prioritize-build-list | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bin/prioritize-build-list b/bin/prioritize-build-list index 26197e4..87450e3 100755 --- a/bin/prioritize-build-list +++ b/bin/prioritize-build-list @@ -60,11 +60,6 @@ if [ ! -r "$1" ]; then usage fi -if [ ! -s "$1" ]; then - >&2 echo 'Empty regex file - nothing to do here.' - exit -fi - # Create a lock file for build list. exec 9> "${sanity_check_lock_file}" @@ -79,7 +74,6 @@ verbose_flock ${wait_for_lock} 8 mysql_join_build_assignments_package_sources mysql_join_build_assignments_binary_packages mysql_join_binary_packages_binary_packages_in_repositories - mysql_join_binary_packages_in_repositories_repositories printf ' SET `build_assignments`.`priority`=(' printf 'SELECT COALESCE(MAX(`all_priorities`.`priority`),0)+1' printf ' FROM (' @@ -92,9 +86,9 @@ verbose_flock ${wait_for_lock} 8 sed ' s/^/`package_sources`.`pkgbase` REGEXP from_base64("/ s/$/") OR / - $ s/ OR $// ' - printf ') AND `repositories`.`name`="build-list";\n' + printf '0) AND `binary_packages_in_repositories`.`repository`=%s;\n' \ + "${repository_ids__any_build_list}" printf 'SELECT row_count();\n' } | \ mysql_run_query | \ -- cgit v1.2.3-70-g09d2