From 084e5210aeb6e6ddbaf03e4d3c1dfef5995d2924 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 15 Apr 2019 10:51:34 +0200 Subject: lib/mysql-functions: mysql_sanity_check() we have more architectures now, thus we have also more invalid architecture combinations build_assignment <-> binary_package --- lib/mysql-functions | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/mysql-functions b/lib/mysql-functions index 9d8aa91..1994184 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -619,13 +619,23 @@ mysql_generate_package_metadata() { mysql_sanity_check() { { - printf 'SELECT CONCAT("\\"any\\" build-assignment building \\"",`bp_arch`.`name`,"\\" binary package: ",`binary_packages`.`pkgname`)' + printf 'SELECT CONCAT(' + printf '"\\"",' + printf '`ba_arch`.`name`,' + printf '"\\" build-assignment building \\"",' + printf '`bp_arch`.`name`,' + printf '"\\" binary package: ",' + printf '`binary_packages`.`pkgname`' + printf ')' printf ' FROM `binary_packages`' mysql_join_binary_packages_build_assignments mysql_join_binary_packages_architectures '' 'bp_arch' mysql_join_build_assignments_architectures '' 'ba_arch' - printf ' WHERE `bp_arch`.`name`!="any"' - printf ' AND `ba_arch`.`name`="any";\n' + printf ' LEFT JOIN `architecture_compatibilities`' + printf ' ON `architecture_compatibilities`.`runs_on`=`build_assignments`.`architecture`' + printf ' AND `architecture_compatibilities`.`built_for`=`binary_packages`.`architecture`' + printf ' AND `architecture_compatibilities`.`fully_compatible`' + printf ' WHERE `architecture_compatibilities`.`id` IS NULL;\n' printf 'SELECT DISTINCT CONCAT("package multiple times in equally stable repositories: {",`a_r`.`name`,",",`b_r`.`name`,"}/",`a`.`pkgname`)' printf ' FROM `binary_packages` AS `a`' mysql_join_binary_packages_binary_packages_in_repositories 'a' 'a_bir' -- cgit v1.2.3-70-g09d2