From a928303d0689cf64a71c639770c2f8c34c6a84f9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 5 May 2020 21:09:59 +0200 Subject: bin/seed-build-list: fix bug, when -a, but no -s given --- bin/seed-build-list | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/bin/seed-build-list b/bin/seed-build-list index 5adf46e..3303416 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -387,15 +387,18 @@ fi printf 'INSERT INTO `relevant_archs`(`id`)' printf ' SELECT `architectures`.`id`' printf ' FROM `architectures`' - printf ' WHERE `architectures`.`name` NOT IN (' - base64_encode_each \ - <"${tmp_dir}/skip-archs" \ - | sed ' - s/^.*$/from_base64("\0")/ - $! s/$/,/ - ' \ - | tr -d '\n' - printf ');\n' + if [ -s "${tmp_dir}/skip-archs" ]; then + printf ' WHERE `architectures`.`name` NOT IN (' + base64_encode_each \ + <"${tmp_dir}/skip-archs" \ + | sed ' + s/^.*$/from_base64("\0")/ + $! s/$/,/ + ' \ + | tr -d '\n' + printf ')' + fi + printf ';\n' # schedule any package, that: # 1) is not on the build-list currently and -- cgit v1.2.3-70-g09d2