index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-11-16 15:26:39 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-16 15:26:39 +0100 |
commit | 3e6fcf6de305ad2b3adf567ff6ffe6906d9b46f4 (patch) | |
tree | 20048b8e9a934cfdf50191d2da1d94fc019ada1f /packages/pkginfo.php | |
parent | 41e81d854f7ea18488c9c60bb46183fb00161174 (diff) |
-rw-r--r-- | packages/pkginfo.php | 50 |
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: |