Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/pkginfo.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/packages/pkginfo.php b/packages/pkginfo.php
index 882c766..9fe7a1c 100644
--- a/packages/pkginfo.php
+++ b/packages/pkginfo.php
@@ -29,6 +29,7 @@ require_once BASE . "/lib/style.php";
"SELECT " .
"`binary_packages`.`id`," .
"`binary_packages`.`pkgname`," .
+ "`sp_q`.`split_packages`," .
"`package_sources`.`pkgbase`," .
"CONCAT(" .
"IF(`binary_packages`.`epoch`=\"0\",\"\",CONCAT(`binary_packages`.`epoch`,\":\"))," .
@@ -56,6 +57,27 @@ require_once BASE . "/lib/style.php";
mysql_join_upstream_repositories_git_repositories() .
mysql_join_upstream_repositories_repository_moves() .
" JOIN `repositories` AS `sr` ON `sr`.`id`=`repository_moves`.`to_repository`" .
+ " JOIN (" .
+ "SELECT DISTINCT `binary_packages`.`build_assignment`," .
+ "GROUP_CONCAT(" .
+ "CONCAT(" .
+ "\"\\\"\",`binary_packages`.`id`,\"\\\": {" .
+ "\\\"pkgname\\\":" .
+ " \\\"\",`binary_packages`.`pkgname`,\"\\\"," .
+ "\\\"repository\\\":" .
+ " \\\"\",`repositories`.`name`,\"\\\"," .
+ "\\\"repo_arch\\\":" .
+ " \\\"\",`architectures`.`name`,\"\\\"" .
+ "}\"" .
+ ")" .
+ ") AS `split_packages`" .
+ " FROM `binary_packages`" .
+ mysql_join_binary_packages_binary_packages_in_repositories() .
+ mysql_join_binary_packages_in_repositories_repositories() .
+ mysql_join_repositories_architectures() .
+ " GROUP BY `binary_packages`.`build_assignment`" .
+ ") AS `sp_q`" .
+ " ON `sp_q`.`build_assignment`=`build_assignments`.`id`" .
" WHERE `binary_packages`.`pkgname`=from_base64(\"" . base64_encode($_GET["pkgname"]) . "\")" .
" AND `architectures`.`name`=from_base64(\"" . base64_encode($_GET["arch"]) . "\")" .
" AND `repositories`.`name`=from_base64(\"" . base64_encode($_GET["repo"]) . "\")" .
@@ -71,6 +93,7 @@ require_once BASE . "/lib/style.php";
throw_http_error(404, "Package Not Found In Buildmaster's Database");
$mysql_content = $mysql_result -> fetch_assoc();
+ $mysql_content["split_packages"] = array_map("unserialize", array_unique(array_map("serialize", json_decode("{".$mysql_content["split_packages"]."}",true))));
if (!$skip_json_checks) {
$same_keys = array (
@@ -430,6 +453,33 @@ if (count($elsewhere)>0) {
<a href="/?repo=<?php print $content["repo"]; ?>" title="Browse the <?php print $content["repo"]; ?> repository"><?php print $content["repo"]; ?></a>
</td>
</tr>
+<?php
+$count = count($content["split_packages"]);
+if ($count > 1) {
+ print " <tr>\n";
+ print " <th>\n";
+ print " Split Packages:\n";
+ print " </th>\n";
+ print " <td>\n";
+ foreach ($content["split_packages"] as $split_package) {
+ print " ";
+ if ($split_package["pkgname"] != $content["pkgname"]) {
+ print "<a href=\"/" . $split_package["repository"];
+ print "/" . $split_package["repo_arch"];
+ print "/" . $split_package["pkgname"];
+ print "/\">";
+ }
+ print $split_package["pkgname"];
+ $count --;
+ if ($split_package["pkgname"] != $content["pkgname"])
+ print "</a>";
+ if ($count > 0)
+ print ", ";
+ }
+ print " </td>\n";
+ print " </tr>\n";
+}
+?>
<tr>
<th>
Description: