index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-11-09 13:05:53 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-09 13:05:53 +0100 |
commit | b1f158cf2511dcc191a5fa827ab7906d97ecb35a (patch) | |
tree | 1ae722cfeb24c9f88523a3109e9d2fc737aeab08 | |
parent | e0a8c21450d860364efc45a83074a4377b439905 (diff) |
-rw-r--r-- | buildmaster/dependencies.php | 29 |
diff --git a/buildmaster/dependencies.php b/buildmaster/dependencies.php index be41234..33bc264 100644 --- a/buildmaster/dependencies.php +++ b/buildmaster/dependencies.php @@ -3,21 +3,22 @@ require_once "../init.php"; require_once BASE . "/lib/mysql.php"; $match = ""; -$dependency_arch_join = ""; + +function dependency_arch_join($name) { + if (isset($_GET["ba_a"])) { + return + " JOIN `architecture_compatibilities`" . + " ON `architecture_compatibilities`.`fully_compatible`" . + " AND `architecture_compatibilities`.`built_for`=`" . $name . "`.`architecture`" . + " JOIN `architectures` AS `ba_a`" . + " ON `architecture_compatibilities`.`runs_on`=`ba_a`.`id`" . + " AND `ba_a`.`name`=from_base64(\"" . base64_encode($_GET["ba_a"]) . "\")"; + } else + return ""; +} if (isset($_GET["a"])) $match .= " AND `architectures`.`name`=from_base64(\"" . base64_encode($_GET["a"]) . "\")"; -if (isset($_GET["ba_a"])) { - $dependency_arch_join_pre = - " JOIN `architecture_compatibilities`" . - " ON `architecture_compatibilities`.`fully_compatible`" . - " AND `architecture_compatibilities`.`built_for`=`"; - $dependency_arch_join_post = - "`.`architecture`" . - " JOIN `architectures` AS `ba_a`" . - " ON `architecture_compatibilities`.`runs_on`=`ba_a`.`id`" . - " AND `ba_a`.`name`=from_base64(\"" . base64_encode($_GET["ba_a"]) . "\")"; -} if (isset($_GET["b"])) $match .= " AND `package_sources`.`pkgbase`=from_base64(\"" . base64_encode($_GET["b"]) . "\")"; if (isset($_GET["p"])) @@ -62,7 +63,7 @@ mysql_run_query( $ignore_install_targets . mysql_join_dependencies_install_target_providers() . mysql_join_install_target_providers_binary_packages('','itp_bp') . - $dependency_arch_join_pre . "itp_bp" . $dependency_arch_join_post . + dependency_arch_join('itp_bp') . " WHERE (`dependency_types`.`relevant_for_binary_packages` OR `repository_stabilities`.`name`=\"unbuilt\")" . " LIMIT " . $limit ); @@ -80,7 +81,7 @@ mysql_run_query( mysql_join_binary_packages_install_target_providers() . mysql_join_install_target_providers_dependencies() . mysql_join_dependencies_binary_packages('','d_bp') . - $dependency_arch_join_pre . "d_bp" . $dependency_arch_join_post . + dependency_arch_join('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') . mysql_join_repositories_repository_stabilities('d_r','d_rs') . |