index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-06-12 09:37:48 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-12 09:37:48 +0200 |
commit | 6c0c74f800ee1d5d41768c0dc475ac6b5a99b6f3 (patch) | |
tree | 39c01c0d8bf0bfacb90e3b81c6ed5b158f5ec8be /bin/bootstrap-mysql | |
parent | 9ced76757869e091a39e22e4c79aab3e4b33dcd6 (diff) |
-rwxr-xr-x | bin/bootstrap-mysql | 29 |
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql index eb6462c..1e6bc89 100755 --- a/bin/bootstrap-mysql +++ b/bin/bootstrap-mysql @@ -109,18 +109,29 @@ fi printf ' JOIN `binary_packages_in_repositories` AS `m_bpir` ON `m_bpir`.`id`=`moveable_bpir`.`id`' mysql_join_binary_packages_in_repositories_binary_packages 'm_bpir' 'm_bp' mysql_join_binary_packages_in_repositories_repositories 'm_bpir' 'm_from_r' - mysql_join_binary_packages_build_assignments 'm_bp' 'm_ba' - mysql_join_build_assignments_package_sources 'm_ba' 'm_ps' - mysql_join_package_sources_upstream_repositories 'm_ps' 'm_ur' - mysql_join_upstream_repositories_repository_moves 'm_ur' - printf ' AND `repository_moves`.`from_repository`=`m_from_r`.`id`' - # in its target repository - printf ' JOIN `repositories` AS `m_to_r` ON `repository_moves`.`to_repository`=`m_to_r`.`id`' - printf ' JOIN `repositories` AS `r_r` ON `r_r`.`stability`=`m_to_r`.`stability`' + # in all repositories more stable than its target repository + printf ' JOIN `repositories` AS `m_to_r` ON `moveable_bpir`.`to_repository`=`m_to_r`.`id`' + printf ' JOIN `repository_stability_relations` AS `rsr_a`' + printf ' ON `rsr_a`.`less_stable`=`m_to_r`.`stability`' + printf ' JOIN `repositories` AS `r_r`' + printf ' AND `rsr_a`.`more_stable`=`r_r`.`stability`' + printf ' AND `r_r`.`architecture`=`m_to_r`.`architecture`' mysql_join_repositories_binary_packages_in_repositories 'r_r' 'r_bpir' mysql_join_binary_packages_in_repositories_binary_packages 'r_bpir' 'r_bp' # all packages with identical names - printf ' AND `r_bp`.`pkgname`=`m_bp`.`pkgname`;\n' + printf ' AND `r_bp`.`pkgname`=`m_bp`.`pkgname`' + # but only the least stable of equally named packages is considered + printf ' WHERE NOT EXISTS (' + printf 'SELECT 1' + printf ' FROM `binary_packages_in_repositories` AS `sup_bpir`' + mysql_join_binary_packages_in_repositories_binary_packages 'sup_bpir' 'sup_bp' + mysql_join_binary_packages_in_repositories_repositories 'sup_bp' 'sup_r' + printf ' JOIN `repository_stability_relations` AS `rsr_b`' + printf ' ON `rsr_b`.`less_stable`=`sup_r`.`stability`' + printf ' WHERE `sup_bp`.`pkgname`=`m_bp`.`pkgname`' + printf ' AND `sup_r`.`architecture`=`m_to_r`.`architecture`' + printf ' AND `rsr_b`.`more_stable`=`r_r`.`stability`' + printf ');\n' # now we delete all unreplaceable and unmoveable packages from the respective # list until no further changes are required printf 'REPEAT\n' |