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 Jul 23 19:09:10 UTC 2020

Modified Files:
        pkgsrc/pkgtools/pkglint: Makefile
        pkgsrc/pkgtools/pkglint/files: buildlink3.go pkglint_test.go

Log Message:
pkgtools/pkglint: update to 20.2.4

Changes since 20.2.3:

Complain about buildlink3.mk files that accidentally set their own
BUILDLINK_PKGSRCDIR variable to a different directory than their own.


To generate a diff of this commit:
cvs rdiff -u -r1.664 -r1.665 pkgsrc/pkgtools/pkglint/Makefile
cvs rdiff -u -r1.38 -r1.39 pkgsrc/pkgtools/pkglint/files/buildlink3.go
cvs rdiff -u -r1.67 -r1.68 pkgsrc/pkgtools/pkglint/files/pkglint_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.664 pkgsrc/pkgtools/pkglint/Makefile:1.665
--- pkgsrc/pkgtools/pkglint/Makefile:1.664      Thu Jul 23 18:40:41 2020
+++ pkgsrc/pkgtools/pkglint/Makefile    Thu Jul 23 19:09:10 2020
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.664 2020/07/23 18:40:41 rillig Exp $
+# $NetBSD: Makefile,v 1.665 2020/07/23 19:09:10 rillig Exp $
 
-PKGNAME=       pkglint-20.2.3
+PKGNAME=       pkglint-20.2.4
 CATEGORIES=    pkgtools
 DISTNAME=      tools
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=golang/}

Index: pkgsrc/pkgtools/pkglint/files/buildlink3.go
diff -u pkgsrc/pkgtools/pkglint/files/buildlink3.go:1.38 pkgsrc/pkgtools/pkglint/files/buildlink3.go:1.39
--- pkgsrc/pkgtools/pkglint/files/buildlink3.go:1.38    Sun Jun  7 15:49:23 2020
+++ pkgsrc/pkgtools/pkglint/files/buildlink3.go Thu Jul 23 19:09:10 2020
@@ -281,6 +281,15 @@ func (ck *Buildlink3Checker) checkVarass
                mkline.Errorf("A buildlink3.mk file must only query its own PKG_BUILD_OPTIONS.%s, not PKG_BUILD_OPTIONS.%s.",
                        ck.pkgbase, value)
        }
+
+       if varname == "BUILDLINK_PKGSRCDIR."+pkgbase {
+               pkgdir := mkline.Filename().Dir()
+               expected := "../../" + G.Pkgsrc.Rel(pkgdir).String()
+               if value != expected {
+                       mkline.Errorf("%s must be set to the package's own path (%s), not %s.",
+                               varname, expected, value)
+               }
+       }
 }
 
 func (ck *Buildlink3Checker) checkVaruseInPkgbase(pkgbaseLine *MkLine) {

Index: pkgsrc/pkgtools/pkglint/files/pkglint_test.go
diff -u pkgsrc/pkgtools/pkglint/files/pkglint_test.go:1.67 pkgsrc/pkgtools/pkglint/files/pkglint_test.go:1.68
--- pkgsrc/pkgtools/pkglint/files/pkglint_test.go:1.67  Wed Jul  1 13:17:41 2020
+++ pkgsrc/pkgtools/pkglint/files/pkglint_test.go       Thu Jul 23 19:09:10 2020
@@ -1484,5 +1484,8 @@ func (s *Suite) Test_InterPackage_Bl3__s
                "NOTE: category/package2/Makefile:4: The modifier \"@v@${v}@\" "+
                        "can be replaced with the simpler \"=\".",
                "ERROR: category/package2/buildlink3.mk:3: Duplicate package identifier "+
-                       "\"package1\" already appeared in ../../category/package1/buildlink3.mk:3.")
+                       "\"package1\" already appeared in ../../category/package1/buildlink3.mk:3.",
+               "ERROR: category/package2/buildlink3.mk:9: "+
+                       "BUILDLINK_PKGSRCDIR.package1 must be set to the package's own path "+
+                       "(../../category/package2), not ../../category/package1.")
 }



Home | Main Index | Thread Index | Old Index