index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | packages/pkginfo.php | 64 |
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`" . |