pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools/pkglint
Module Name: pkgsrc
Committed By: rillig
Date: Thu Aug 12 05:29:42 UTC 2021
Modified Files:
pkgsrc/pkgtools/pkglint: Makefile
pkgsrc/pkgtools/pkglint/files: package.go package_test.go
Log Message:
pkgtools/pkglint: update to 21.2.3
Changes since 21.2.2:
Temporarily disable the warning about Meson and gmake. It led to a
false positive in x11/libxkbcommon, where pkglint wrongly assumed that
the package would use gmake.
For packages using Meson, do not warn if an included package uses
CONFIGURE_ARGS.
To generate a diff of this commit:
cvs rdiff -u -r1.693 -r1.694 pkgsrc/pkgtools/pkglint/Makefile
cvs rdiff -u -r1.100 -r1.101 pkgsrc/pkgtools/pkglint/files/package.go
cvs rdiff -u -r1.83 -r1.84 pkgsrc/pkgtools/pkglint/files/package_test.go
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/pkglint/Makefile
diff -u pkgsrc/pkgtools/pkglint/Makefile:1.693 pkgsrc/pkgtools/pkglint/Makefile:1.694
--- pkgsrc/pkgtools/pkglint/Makefile:1.693 Wed Aug 11 19:35:10 2021
+++ pkgsrc/pkgtools/pkglint/Makefile Thu Aug 12 05:29:41 2021
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.693 2021/08/11 19:35:10 bsiegert Exp $
+# $NetBSD: Makefile,v 1.694 2021/08/12 05:29:41 rillig Exp $
-PKGNAME= pkglint-21.2.2
-PKGREVISION= 1
+PKGNAME= pkglint-21.2.3
CATEGORIES= pkgtools
DISTNAME= tools
MASTER_SITES= ${MASTER_SITE_GITHUB:=golang/}
Index: pkgsrc/pkgtools/pkglint/files/package.go
diff -u pkgsrc/pkgtools/pkglint/files/package.go:1.100 pkgsrc/pkgtools/pkglint/files/package.go:1.101
--- pkgsrc/pkgtools/pkglint/files/package.go:1.100 Fri Jun 25 14:15:01 2021
+++ pkgsrc/pkgtools/pkglint/files/package.go Thu Aug 12 05:29:41 2021
@@ -1194,7 +1194,7 @@ func (pkg *Package) checkMeson(mklines *
func (pkg *Package) checkMesonGnuMake(mklines *MkLines) {
gmake := mklines.Tools.ByName("gmake")
- if gmake != nil && gmake.UsableAtRunTime() {
+ if G.Experimental && gmake != nil && gmake.UsableAtRunTime() {
mkline := NewLineWhole(pkg.File("."))
mkline.Warnf("Meson packages usually don't need GNU make.")
mkline.Explain(
@@ -1204,12 +1204,19 @@ func (pkg *Package) checkMesonGnuMake(mk
}
func (pkg *Package) checkMesonConfigureArgs() {
- if mkline := pkg.vars.FirstDefinition("CONFIGURE_ARGS"); mkline != nil {
- mkline.Warnf("Meson packages usually don't need CONFIGURE_ARGS.")
- mkline.Explain(
- "After migrating a package from GNU make to Meson,",
- "CONFIGURE_ARGS are typically not needed anymore.")
+ mkline := pkg.vars.FirstDefinition("CONFIGURE_ARGS")
+ if mkline == nil {
+ return
}
+
+ if pkg.Rel(mkline.Location.Filename).HasPrefixPath("..") {
+ return
+ }
+
+ mkline.Warnf("Meson packages usually don't need CONFIGURE_ARGS.")
+ mkline.Explain(
+ "After migrating a package from GNU make to Meson,",
+ "CONFIGURE_ARGS are typically not needed anymore.")
}
func (pkg *Package) checkMesonPython(mklines *MkLines) {
Index: pkgsrc/pkgtools/pkglint/files/package_test.go
diff -u pkgsrc/pkgtools/pkglint/files/package_test.go:1.83 pkgsrc/pkgtools/pkglint/files/package_test.go:1.84
--- pkgsrc/pkgtools/pkglint/files/package_test.go:1.83 Sat Apr 17 18:10:14 2021
+++ pkgsrc/pkgtools/pkglint/files/package_test.go Thu Aug 12 05:29:42 2021
@@ -2619,6 +2619,14 @@ func (s *Suite) Test_Package_checkUseLan
}
func (s *Suite) Test_Package_checkMesonGnuMake(c *check.C) {
+
+ // False positive in x11/libxkbcommon, 2021-08-12.
+ //
+ // It seems that the Tools registry is not initialized properly since
+ // x11/libxkbcommon does not mention gmake at all, and 'bmake show-all'
+ // also does not contain 'gmake'.
+ G.Experimental = true
+
t := s.Init(c)
t.CreateFileLines("devel/meson/build.mk")
@@ -2632,7 +2640,9 @@ func (s *Suite) Test_Package_checkMesonG
G.Check(".")
- // XXX: Giving the line number would be nice.
+ // XXX: Giving the line number where gmake is actually used by the
+ // package would be nice. Without that information, it is unclear why
+ // the package uses gmake at all.
t.CheckOutputLines(
"WARN: Meson packages usually don't need GNU make.")
}
@@ -2654,6 +2664,29 @@ func (s *Suite) Test_Package_checkMesonC
"WARN: Makefile:20: Meson packages usually don't need CONFIGURE_ARGS.")
}
+func (s *Suite) Test_Package_checkMesonConfigureArgs__include(c *check.C) {
+ t := s.Init(c)
+
+ t.CreateFileLines("devel/meson/build.mk")
+ t.CreateFileLines("devel/libcommon/use.mk",
+ MkCvsID,
+ "",
+ "CONFIGURE_ARGS+=\t--enable-feature")
+ t.SetUpPackage("category/package",
+ ".include \"../../devel/libcommon/use.mk\"",
+ ".include \"../../devel/meson/build.mk\"")
+ t.Chdir("category/package")
+ t.FinishSetUp()
+
+ G.Check(".")
+
+ // When checking the package x11/libxkbcommon, do not warn that
+ // converters/libiconv/builtin.mk defines CONFIGURE_ARGS, since that
+ // file may be used by other packages as well, or the relevant section
+ // may be guarded by '.if ${HAS_CONFIGURE}'.
+ t.CheckOutputEmpty()
+}
+
func (s *Suite) Test_Package_checkMesonPython(c *check.C) {
t := s.Init(c)
Home |
Main Index |
Thread Index |
Old Index