mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Group dependencies by dependency type
Implements FS#40888. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
13693fbdbc
commit
2b29fa4bb0
1 changed files with 10 additions and 0 deletions
|
@ -29,6 +29,16 @@ $grps = pkg_groups($row["ID"]);
|
||||||
$deps = pkg_dependencies($row["ID"]);
|
$deps = pkg_dependencies($row["ID"]);
|
||||||
$requiredby = pkg_required($row["Name"]);
|
$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 = pkg_relations($row["ID"]);
|
||||||
$rels_c = $rels_p = $rels_r = array();
|
$rels_c = $rels_p = $rels_r = array();
|
||||||
foreach ($rels as $rel) {
|
foreach ($rels as $rel) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue