Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildmaster/dependencies.php29
1 files changed, 15 insertions, 14 deletions
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') .