Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce-depends.awk: Improve matching of "pkgbase>=version". #17

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions mk/pkgformat/pkg/reduce-depends.awk
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,17 @@ BEGIN {
match_all = 1;
for (d = 1; d <= D; d++) {
dep = depends[pkgpath, d]
if (dep ~ /[{]/ || \
dep ~ />=[0-9][0-9\.]*(nb[0-9]+)?<[0-9]+/ || \
dep !~ />=[0-9]+/)
{
if (dep ~ /.+>=[0-9A-Za-z.]+$/) {
ge_depends[dep] = dep
} else {
reduced[N++] = dep ":" pkgsrcdirs[pkgpath]
continue
}
ge_depends[dep] = dep
}
for (dep in ge_depends) {
dep2pkg = dep; sub(">=", "-", dep2pkg)
match_all = 1
for (pattern in ge_depends) {
cmd = PKG_ADMIN " pmatch \"" pattern "\" " dep2pkg
cmd = PKG_ADMIN " pmatch '" pattern "' '" dep2pkg "'"
if (system(cmd) != 0) {
match_all = 0
break
Expand Down