Skip to content

Commit 2543e22

Browse files
committed
graph: detect sections on keywords
Priorly, aur-graph would detect if a pkgname section by the presence of a blank line. However, these are removed by pacini, causing dependencies from split packages to be incorrectly considered. Specifically, when a split package contains an empty dependency field (depends =) an exit condition is triggered. The correct approach is to delimit by pkgbase or pkgname keywords, as described in SRCINFO(5). Fixes aurutils#1228
1 parent 70a90ff commit 2543e22

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/util/aur-graph

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ BEGIN {
6565

6666
$1 == "pkgbase" {
6767
pkgbase = $3
68-
6968
pkgver = ""
69+
70+
# SRCINFO(5), "Section headers"
7071
in_split_pkg = 0
7172
delete(arch)
7273

@@ -107,11 +108,11 @@ index($1, "optdepends") == 1 && !in_split_pkg {
107108
}
108109
}
109110

110-
NF == 0 {
111-
in_split_pkg = 1
112-
}
113111

114112
$1 == "pkgname" {
113+
# SRCINFO(5), "Section headers"
114+
in_split_pkg = 1
115+
115116
pkg_map[$3] = pkgbase # node
116117
ver_map[$3] = pkgver # weight
117118
}

0 commit comments

Comments
 (0)