[aur-dev] [PATCH] Group dependencies by dependency type
Lukas Fleischer
archlinux at cryptocrack.de
Sun Aug 10 06:31:20 EDT 2014
Implements FS#40888.
Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
web/template/pkg_details.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 7f01d2f..8a3cbcc 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -29,6 +29,16 @@ $grps = pkg_groups($row["ID"]);
$deps = pkg_dependencies($row["ID"]);
$requiredby = pkg_required($row["Name"]);
+usort($deps, function($x, $y) {
+ if ($x[1] == "depends" && $y[1] != "depends") {
+ return -1;
+ }
+ if ($y[1] == "depends" && $x[1] != "depends") {
+ return 1;
+ }
+ return $x[1] == $y[1] ? strcmp($x[0], $y[0]) : strcmp($x[1], $y[1]);
+});
+
$rels = pkg_relations($row["ID"]);
$rels_c = $rels_p = $rels_r = array();
foreach ($rels as $rel) {
--
2.0.4
More information about the aur-dev
mailing list