From 8c984e6d818e097dd09a9974343dc52de99386b8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 26 Nov 2019 14:27:45 +0100 Subject: bin/seed-build-list: ignore ignored packages with -a, too --- bin/seed-build-list | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'bin/seed-build-list') diff --git a/bin/seed-build-list b/bin/seed-build-list index 65bba20..81104f7 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -351,7 +351,8 @@ fi if ${auto}; then # schedule any package, that: # 1) is not on the build-list currently and - # 2) has some dependency which is not provided by any package which + # 2) is not in ignore-packages and + # 3) has some dependency which is not provided by any package which # a) is also on the build-list or # b) is the least stable package with that name and for that architecture printf 'CREATE TEMPORARY TABLE `least_stable_bp%s`(`id` BIGINT, `is_on_build_list` BIT(1), PRIMARY KEY `id`(`id`));\n' \ @@ -417,9 +418,19 @@ fi printf ' FROM `least_stable_bp`' printf ' JOIN `binary_packages`' printf ' ON `binary_packages`.`id`=`least_stable_bp`.`id`' - # 1) + # 1) not on the build-list printf ' WHERE `least_stable_bp`.`is_on_build_list`;' + printf 'CREATE TEMPORARY TABLE `ignore_packages`(' + printf '`architecture` VARCHAR(16),' + printf '`pkgbase` VARCHAR(64),' + printf 'UNIQUE KEY `content`(`architecture`,`pkgbase`)' + printf ');\n' + if [ -r "${tmp_dir}/ignore-packages" ]; then + printf 'LOAD DATA LOCAL INFILE "%s" INTO TABLE `ignore_packages` COLUMNS TERMINATED BY " ";\n' \ + "${tmp_dir}/ignore-packages" + fi + printf 'SELECT DISTINCT "pkgbase",`ba_a`.`name`,`package_sources`.`pkgbase`,`upstream_repositories`.`name`' printf ' FROM `least_stable_bp`' printf ' JOIN `binary_packages`' @@ -432,8 +443,16 @@ fi mysql_join_build_assignments_architectures '' 'ba_a' mysql_join_build_assignments_package_sources mysql_join_package_sources_upstream_repositories - # some dependencies are not provided by the least stable packages + # 2) not ignored printf ' WHERE NOT EXISTS (' + printf 'SELECT 1' + printf ' FROM `ignore_packages`' + printf ' WHERE (' + printf '`ignore_packages`.`pkgbase`=`binary_packages`.`pkgname`' + printf ' OR `ignore_packages`.`pkgbase`=`package_sources`.`pkgbase`' + printf ') AND `ba_a`.`name`=`ignore_packages`.`architecture`' + # 3) some dependencies are not provided by the least stable packages + printf ') AND NOT EXISTS (' printf 'SELECT 1' printf ' FROM `least_stable_bp_copy`' printf ' JOIN `binary_packages` AS `itp_bp`' @@ -461,6 +480,7 @@ fi printf ');\n' printf 'DROP TEMPORARY TABLE `least_stable_bp%s`;\n' \ '' '_copy' + printf 'DROP TEMPORARY TABLE `ignore_packages`;\n' fi } | \ mysql_run_query | \ -- cgit v1.2.3