Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/seed-build-list
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-01 11:06:41 +0200
committerErich Eckner <git@eckner.net>2018-06-01 11:06:41 +0200
commite0c167a65916bf995add39aec94f5f524af834e4 (patch)
treee828228392ecdc50115468c7384c0e0353b2382b /bin/seed-build-list
parentb72da8d58250ade67c3315545665cd2f77c86d01 (diff)
make `binary_packages`.`is_to_be_deleted` and `binary_packages`.`last_moved` obsolete; cleanup some queries
Diffstat (limited to 'bin/seed-build-list')
-rwxr-xr-xbin/seed-build-list13
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/seed-build-list b/bin/seed-build-list
index ce4239c..8bdc167 100755
--- a/bin/seed-build-list
+++ b/bin/seed-build-list
@@ -211,10 +211,11 @@ fi
printf ' WHERE `repositories`.`name` IN ("build-list","deletion-list")'
# packages with no not-to-be-deleted and at least on to-be-deleted version should be ignored
printf ' OR ('
- printf '`ignore_bin`.`is_to_be_deleted`'
+ printf '`binary_packages_in_repositories`.`is_to_be_deleted`'
printf ' AND NOT EXISTS ('
- printf 'SELECT * FROM `binary_packages` AS `other_bin`'
- printf ' WHERE NOT `other_bin`.`is_to_be_deleted`'
+ printf 'SELECT 1 FROM `binary_packages` AS `other_bin`'
+ mysql_join_binary_packages_binary_packages_in_repositories 'other_bin' 'other_bpir'
+ printf ' WHERE NOT `other_bpir`.`is_to_be_deleted`'
printf ' AND `other_bin`.`pkgname`=`ignore_bin`.`pkgname`'
printf '));\n'
} | \
@@ -245,10 +246,10 @@ printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64), `repository` V
cat "${tmp_dir}/must-haves" "${tmp_dir}/ignore-packages"
printf 'SELECT `must_haves`.`pkgname` FROM `must_haves`'
printf ' WHERE NOT EXISTS ('
- printf 'SELECT * FROM `binary_packages`'
+ printf 'SELECT 1 FROM `binary_packages`'
printf ' WHERE `binary_packages`.`pkgname`=`must_haves`.`pkgname`'
printf ') AND NOT EXISTS ('
- printf 'SELECT * FROM `ignore_packages`'
+ printf 'SELECT 1 FROM `ignore_packages`'
printf ' WHERE `ignore_packages`.`pkgname`=`must_haves`.`pkgname`'
printf ') AND NOT `must_haves`.`pkgname` LIKE "lib32-%%";\n'
} | \
@@ -318,7 +319,7 @@ printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64), `repository` V
printf ' AND `subst_bp`.`id`!=`binary_packages`.`id`'
printf ' AND `subst_bp`.`pkgname`=`binary_packages`.`pkgname`'
printf ') AND NOT EXISTS ('
- printf 'SELECT * FROM `install_target_providers`'
+ printf 'SELECT 1 FROM `install_target_providers`'
mysql_join_install_target_providers_binary_packages '' 'subst_bp'
mysql_join_binary_packages_binary_packages_in_repositories 'subst_bp' 'subst_bir'
mysql_join_binary_packages_in_repositories_repositories 'subst_bir' 'subst_r'