|author||Erich Eckner <email@example.com>||2019-12-06 09:03:50 +0100|
|committer||Erich Eckner <firstname.lastname@example.org>||2019-12-06 09:03:50 +0100|
bin/seed-build-list: do not schedule to-be-deleted packages via -a
Diffstat (limited to 'bin/seed-build-list')
1 files changed, 15 insertions, 4 deletions
diff --git a/bin/seed-build-list b/bin/seed-build-list
index 81104f7..1ac49d5 100755
@@ -20,8 +20,6 @@
# TODO: remove hard-coded package suffixes
-# TODO: -a should not reschedule to-be-deleted packages
# TODO: -a reschedules too many packages (for example, packages, that have just been rescheduled in a previous run)
# shellcheck disable=SC2016
@@ -352,7 +350,8 @@ fi
# schedule any package, that:
# 1) is not on the build-list currently and
# 2) is not in ignore-packages and
- # 3) has some dependency which is not provided by any package which
+ # 3) is not on the deletion-list or to-be-deleted and
+ # 4) 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' \
@@ -451,7 +450,19 @@ fi
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
+ # 3) not on the deletion-list or to-be-deleted
+ printf ' AND NOT EXISTS ('
+ printf 'SELECT 1'
+ printf ' FROM `binary_packages` AS `d_bp`'
+ mysql_join_binary_packages_binary_packages_in_repositories 'd_bp' 'd_bpir'
+ mysql_join_binary_packages_in_repositories_repositories 'd_bpir' 'd_r'
+ printf ' AND ('
+ printf '`d_r`.`stability`=%s' \
+ printf ' OR `d_bpir`.`is_to_be_deleted`'
+ printf ') WHERE `d_bp`.`pkgname`=`binary_packages`.`pkgname`'
+ printf ' AND `ba_a`.`name`=`d_r`.`architecture`'
+ # 4) some dependencies are not provided by the least stable packages
printf ') AND NOT EXISTS ('
printf 'SELECT 1'
printf ' FROM `least_stable_bp_copy`'