Wed May 22 16:07:16 2019 UTC ()
pkgtools/pkglint: update to 5.7.11
Changes since 5.7.10:
Fixed wrong warnings about autoconf being an unknown shell command when
an included file had defined USE_TOOLS+=autoconf213.
(rillig)
diff -r1.580 -r1.581 pkgsrc/pkgtools/pkglint/Makefile
diff -r1.54 -r1.55 pkgsrc/pkgtools/pkglint/files/package.go
diff -r1.13 -r1.14 pkgsrc/pkgtools/pkglint/files/tools.go
diff -r1.15 -r1.16 pkgsrc/pkgtools/pkglint/files/tools_test.go
--- pkgsrc/pkgtools/pkglint/Makefile 2019/05/21 17:59:48 1.580
+++ pkgsrc/pkgtools/pkglint/Makefile 2019/05/22 16:07:16 1.581
--- pkgsrc/pkgtools/pkglint/files/Attic/package.go 2019/05/21 17:59:48 1.54
+++ pkgsrc/pkgtools/pkglint/files/Attic/package.go 2019/05/22 16:07:16 1.55
--- pkgsrc/pkgtools/pkglint/files/Attic/tools.go 2019/04/23 21:20:49 1.13
+++ pkgsrc/pkgtools/pkglint/files/Attic/tools.go 2019/05/22 16:07:16 1.14
@@ -302,23 +302,38 @@
return
}
- deps := mkline.ValueFields(value)
-
- // See mk/tools/autoconf.mk:/^\.if !defined/
- if matches(value, `\bautoconf213\b`) {
- deps = append(deps, "autoconf-2.13", "autoheader-2.13", "autoreconf-2.13", "autoscan-2.13", "autoupdate-2.13", "ifnames-2.13")
- }
- if matches(value, `\bautoconf\b`) {
- deps = append(deps, "autoheader", "autom4te", "autoreconf", "autoscan", "autoupdate", "ifnames")
- }
-
validity := tr.validity(mkline.Basename, addToUseTools)
- for _, dep := range deps {
+ for _, dep := range mkline.ValueFields(value) {
name := strings.Split(dep, ":")[0]
if createIfAbsent || tr.ByName(name) != nil {
tr.def(name, "", false, validity, nil)
+ for _, implicitName := range tr.implicitTools(name) {
+ tr.def(implicitName, "", false, validity, nil)
+ }
}
}
+}
+
+func (tr *Tools) implicitTools(toolName string) []string {
+
+ // See mk/tools/autoconf.mk:/^\.if !defined/
+
+ if toolName == "autoconf213" {
+ return []string{
+ "autoconf-2.13", "autoheader-2.13", "autoreconf-2.13",
+ "autoscan-2.13", "autoupdate-2.13", "ifnames-2.13",
+ "autoconf",
+ "autoheader", "autom4te", "autoreconf",
+ "autoscan", "autoupdate", "ifnames"}
+ }
+
+ if toolName == "autoconf" {
+ return []string{
+ "autoheader", "autom4te", "autoreconf",
+ "autoscan", "autoupdate", "ifnames"}
+ }
+
+ return nil
}
func (tr *Tools) validity(basename string, useTools bool) Validity {
--- pkgsrc/pkgtools/pkglint/files/Attic/tools_test.go 2019/04/23 21:20:49 1.15
+++ pkgsrc/pkgtools/pkglint/files/Attic/tools_test.go 2019/05/22 16:07:16 1.16