summaryrefslogtreecommitdiff
path: root/packages/pkginfo.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-09 10:50:09 +0100
committerErich Eckner <git@eckner.net>2018-11-09 10:50:09 +0100
commitf89a3fd4c3577eba5a9e3f1c1d27c26fb8432f7b (patch)
treea7720fef45dd700374cda0843ed2d2354ac5bc28 /packages/pkginfo.php
parent1a9e9dc143b73b29113c5d22c0812f25c43cd34a (diff)
downloadarchweb32-f89a3fd4c3577eba5a9e3f1c1d27c26fb8432f7b.tar.xz
lib/mysql-joins.php new: it contains mysql_join_* functions similar to the ones in lib/mysql-functions of the build scripts
Diffstat (limited to 'packages/pkginfo.php')
-rw-r--r--packages/pkginfo.php64
1 files changed, 32 insertions, 32 deletions
diff --git a/packages/pkginfo.php b/packages/pkginfo.php
index a20df02..882c766 100644
--- a/packages/pkginfo.php
+++ b/packages/pkginfo.php
@@ -46,15 +46,15 @@ require_once BASE . "/lib/style.php";
"MAX(`binary_packages_in_repositories`.`last_moved`) AS `last_moved`," .
"`sr`.`name` AS `stable_repo`" .
" FROM `binary_packages`" .
- " JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id`" .
- " JOIN `binary_packages_in_repositories` ON `binary_packages`.`id`=`binary_packages_in_repositories`.`package`" .
- " JOIN `repositories` ON `binary_packages_in_repositories`.`repository`=`repositories`.`id`" .
- " JOIN `repository_stabilities` ON `repositories`.`stability`=`repository_stabilities`.`id`" .
- " JOIN `build_assignments` ON `binary_packages`.`build_assignment`=`build_assignments`.`id`" .
- " JOIN `package_sources` ON `build_assignments`.`package_source`=`package_sources`.`id`" .
- " JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository`=`upstream_repositories`.`id`" .
- " JOIN `git_repositories` ON `upstream_repositories`.`git_repository`=`git_repositories`.`id`" .
- " JOIN `repository_moves` ON `upstream_repositories`.`id`=`repository_moves`.`upstream_package_repository`" .
+ mysql_join_binary_packages_architectures() .
+ mysql_join_binary_packages_binary_packages_in_repositories() .
+ mysql_join_binary_packages_in_repositories_repositories() .
+ mysql_join_repositories_repository_stabilities() .
+ mysql_join_binary_packages_build_assignments() .
+ mysql_join_build_assignments_package_sources() .
+ mysql_join_package_sources_upstream_repositories() .
+ mysql_join_upstream_repositories_git_repositories() .
+ mysql_join_upstream_repositories_repository_moves() .
" JOIN `repositories` AS `sr` ON `sr`.`id`=`repository_moves`.`to_repository`" .
" WHERE `binary_packages`.`pkgname`=from_base64(\"" . base64_encode($_GET["pkgname"]) . "\")" .
" AND `architectures`.`name`=from_base64(\"" . base64_encode($_GET["arch"]) . "\")" .
@@ -122,18 +122,18 @@ require_once BASE . "/lib/style.php";
" FROM `dependencies`" .
" LEFT JOIN (".
"`binary_packages_in_repositories` AS `bpir`" .
- " JOIN `repositories` AS `r` ON `r`.`id`=`bpir`.`repository`" .
+ mysql_join_binary_packages_in_repositories_repositories('bpir','r') .
") ON `bpir`.`package`=`dependencies`.`dependent`" .
- " JOIN `dependency_types` ON `dependency_types`.`id`=`dependencies`.`dependency_type`" .
- " JOIN `install_targets` ON `install_targets`.`id`=`dependencies`.`depending_on`" .
+ mysql_join_dependencies_dependency_types() .
+ mysql_join_dependencies_install_targets() .
" AND `install_targets`.`name` NOT IN (\"base\",\"base-devel\")" .
- " JOIN `versions` ON `versions`.`id`=`dependencies`.`version`" .
+ mysql_join_dependencies_versions() .
" LEFT JOIN (" .
"`install_target_providers`" .
- " JOIN `binary_packages` ON `install_target_providers`.`package`=`binary_packages`.`id`" .
- " JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id`" .
- " JOIN `binary_packages_in_repositories` ON `binary_packages`.`id`=`binary_packages_in_repositories`.`package`" .
- " JOIN `repositories` ON `binary_packages_in_repositories`.`repository`=`repositories`.`id`" .
+ mysql_join_install_target_providers_binary_packages() .
+ mysql_join_binary_packages_architectures() .
+ mysql_join_binary_packages_binary_packages_in_repositories() .
+ mysql_join_binary_packages_in_repositories_repositories() .
" JOIN `repository_stability_relations` ON `repository_stability_relations`.`more_stable`=`repositories`.`stability`" .
" AND `repository_stability_relations`.`less_stable`=" . $mysql_content["repo_stability"] .
") ON `install_target_providers`.`install_target`=`dependencies`.`depending_on`" .
@@ -141,8 +141,8 @@ require_once BASE . "/lib/style.php";
" WHERE `dependencies`.`dependent`=" . $mysql_content["id"] .
" AND NOT EXISTS (" .
"SELECT 1 FROM `binary_packages` AS `subst_bp`" .
- " JOIN `binary_packages_in_repositories` AS `subst_bpir` ON `subst_bp`.`id`=`subst_bpir`.`package`" .
- " JOIN `repositories` AS `subst_r` ON `subst_bpir`.`repository`=`subst_r`.`id`" .
+ mysql_join_binary_packages_binary_packages_in_repositories('subst_bp','subst_bpir') .
+ mysql_join_binary_packages_in_repositories_repositories('subst_bpir','subst_r') .
// the substitue must be truly less stable than the dependency
" JOIN `repository_stability_relations` AS `subst_rsr` ON `subst_rsr`.`less_stable`=`subst_r`.`stability`" .
" AND `subst_rsr`.`less_stable`!=`subst_rsr`.`more_stable`" .
@@ -219,24 +219,24 @@ require_once BASE . "/lib/style.php";
" FROM `install_target_providers`" .
" LEFT JOIN (".
"`binary_packages_in_repositories` AS `bpir`" .
- " JOIN `repositories` AS `r` ON `r`.`id`=`bpir`.`repository`" .
+ mysql_join_binary_packages_in_repositories_repositories('bpir','r') .
") ON `bpir`.`package`=`install_target_providers`.`package`" .
- " JOIN `install_targets` ON `install_targets`.`id`=`install_target_providers`.`install_target`" .
+ mysql_join_install_target_providers_install_targets() .
" AND `install_targets`.`name` NOT IN (\"base\",\"base-devel\")" .
- " JOIN `dependencies` ON `install_target_providers`.`install_target`=`dependencies`.`depending_on`" .
- " JOIN `dependency_types` ON `dependency_types`.`id`=`dependencies`.`dependency_type`" .
- " JOIN `binary_packages` ON `dependencies`.`dependent`=`binary_packages`.`id`" .
- " JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id`" .
- " JOIN `binary_packages_in_repositories` ON `binary_packages`.`id`=`binary_packages_in_repositories`.`package`" .
- " JOIN `repositories` ON `binary_packages_in_repositories`.`repository`=`repositories`.`id`" .
+ mysql_join_install_target_providers_dependencies() .
+ mysql_join_dependencies_dependency_types() .
+ mysql_join_dependencies_binary_packages() .
+ mysql_join_binary_packages_architectures() .
+ mysql_join_binary_packages_binary_packages_in_repositories() .
+ mysql_join_binary_packages_in_repositories_repositories() .
" AND `repositories`.`architecture`=`r`.`architecture`" .
" JOIN `repository_stability_relations` ON `repository_stability_relations`.`less_stable`=`repositories`.`stability`" .
" AND `repository_stability_relations`.`more_stable`=" . $mysql_content["repo_stability"] .
" WHERE `install_target_providers`.`package`=" . $mysql_content["id"] .
" AND NOT EXISTS (" .
"SELECT 1 FROM `binary_packages` AS `subst_bp`" .
- " JOIN `binary_packages_in_repositories` AS `subst_bpir` ON `subst_bp`.`id`=`subst_bpir`.`package`" .
- " JOIN `repositories` AS `subst_r` ON `subst_bpir`.`repository`=`subst_r`.`id`" .
+ mysql_join_binary_packages_binary_packages_in_repositories('subst_bp','subst_bpir') .
+ mysql_join_binary_packages_in_repositories_repositories('subst_bpir','subst_r') .
// the substitue must be truly less stable than we
" JOIN `repository_stability_relations` AS `subst_rsr` ON `subst_rsr`.`less_stable`=`subst_r`.`stability`" .
" AND `subst_rsr`.`less_stable`!=`subst_rsr`.`more_stable`" .
@@ -281,9 +281,9 @@ require_once BASE . "/lib/style.php";
"`binary_packages`.`sub_pkgrel`" .
") AS `version`" .
" FROM `binary_packages` " .
- " JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id`" .
- " JOIN `binary_packages_in_repositories` ON `binary_packages`.`id`=`binary_packages_in_repositories`.`package`" .
- " JOIN `repositories` ON `binary_packages_in_repositories`.`repository`=`repositories`.`id`" .
+ mysql_join_binary_packages_architectures() .
+ mysql_join_binary_packages_binary_packages_in_repositories() .
+ mysql_join_binary_packages_in_repositories_repositories() .
" JOIN `binary_packages` AS `original`" .
" ON `binary_packages`.`pkgname`=`original`.`pkgname`" .
" AND `binary_packages`.`id`!=`original`.`id`" .