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: Sun Jan 1 16:41:37 UTC 2017
Modified Files:
pkgsrc/pkgtools/pkglint: Makefile
pkgsrc/pkgtools/pkglint/files: vardefs.go vartype.go vartypecheck.go
vartypecheck_test.go
Log Message:
Updated pkglint to 5.4.15.
Changes since 5.4.14:
* Definitions for CONF_FILES should always come in pairs (pkg/37284)
To generate a diff of this commit:
cvs rdiff -u -r1.506 -r1.507 pkgsrc/pkgtools/pkglint/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/pkgtools/pkglint/files/vardefs.go
cvs rdiff -u -r1.11 -r1.12 pkgsrc/pkgtools/pkglint/files/vartype.go
cvs rdiff -u -r1.22 -r1.23 pkgsrc/pkgtools/pkglint/files/vartypecheck.go
cvs rdiff -u -r1.15 -r1.16 pkgsrc/pkgtools/pkglint/files/vartypecheck_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.506 pkgsrc/pkgtools/pkglint/Makefile:1.507
--- pkgsrc/pkgtools/pkglint/Makefile:1.506 Sun Jan 1 15:15:47 2017
+++ pkgsrc/pkgtools/pkglint/Makefile Sun Jan 1 16:41:37 2017
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.506 2017/01/01 15:15:47 rillig Exp $
+# $NetBSD: Makefile,v 1.507 2017/01/01 16:41:37 rillig Exp $
-PKGNAME= pkglint-5.4.14
+PKGNAME= pkglint-5.4.15
DISTFILES= # none
CATEGORIES= pkgtools
Index: pkgsrc/pkgtools/pkglint/files/vardefs.go
diff -u pkgsrc/pkgtools/pkglint/files/vardefs.go:1.19 pkgsrc/pkgtools/pkglint/files/vardefs.go:1.20
--- pkgsrc/pkgtools/pkglint/files/vardefs.go:1.19 Tue Dec 13 00:58:07 2016
+++ pkgsrc/pkgtools/pkglint/files/vardefs.go Sun Jan 1 16:41:37 2017
@@ -242,7 +242,7 @@ func (gd *GlobalData) InitVartypes() {
acl("CONFIG_SHELL", lkNone, BtPathname, "Makefile, Makefile.common: set")
acl("CONFIG_SUB_OVERRIDE", lkShell, BtPathmask, "Makefile, Makefile.common: set, append")
pkglist("CONFLICTS", lkSpace, BtDependency)
- pkglist("CONF_FILES", lkShell, BtShellWord)
+ pkglist("CONF_FILES", lkNone, BtConfFiles)
pkg("CONF_FILES_MODE", lkNone, enum("0644 0640 0600 0400"))
pkglist("CONF_FILES_PERMS", lkShell, BtPerms)
sys("COPY", lkNone, enum("-c")) // The flag that tells ${INSTALL} to copy a file
Index: pkgsrc/pkgtools/pkglint/files/vartype.go
diff -u pkgsrc/pkgtools/pkglint/files/vartype.go:1.11 pkgsrc/pkgtools/pkglint/files/vartype.go:1.12
--- pkgsrc/pkgtools/pkglint/files/vartype.go:1.11 Sun Jan 1 15:15:47 2017
+++ pkgsrc/pkgtools/pkglint/files/vartype.go Sun Jan 1 16:41:37 2017
@@ -111,7 +111,7 @@ func (vt *Vartype) IsConsideredList() bo
return false
}
switch vt.basicType {
- case BtAwkCommand, BtSedCommands, BtShellCommand, BtShellCommands, BtLicense:
+ case BtAwkCommand, BtSedCommands, BtShellCommand, BtShellCommands, BtLicense, BtConfFiles:
return true
}
return false
@@ -213,6 +213,7 @@ var (
BtCategory = &BasicType{"Category", (*VartypeCheck).Category}
BtCFlag = &BasicType{"CFlag", (*VartypeCheck).CFlag}
BtComment = &BasicType{"Comment", (*VartypeCheck).Comment}
+ BtConfFiles = &BasicType{"ConfFiles", (*VartypeCheck).ConfFiles}
BtDependency = &BasicType{"Dependency", (*VartypeCheck).Dependency}
BtDependencyWithPath = &BasicType{"DependencyWithPath", (*VartypeCheck).DependencyWithPath}
BtDistSuffix = &BasicType{"DistSuffix", (*VartypeCheck).DistSuffix}
Index: pkgsrc/pkgtools/pkglint/files/vartypecheck.go
diff -u pkgsrc/pkgtools/pkglint/files/vartypecheck.go:1.22 pkgsrc/pkgtools/pkglint/files/vartypecheck.go:1.23
--- pkgsrc/pkgtools/pkglint/files/vartypecheck.go:1.22 Sun Jan 1 15:15:47 2017
+++ pkgsrc/pkgtools/pkglint/files/vartypecheck.go Sun Jan 1 16:41:37 2017
@@ -194,6 +194,13 @@ func (cv *VartypeCheck) Comment() {
}
}
+func (cv *VartypeCheck) ConfFiles() {
+ words, _ := splitIntoMkWords(cv.MkLine.Line, cv.Value)
+ if len(words)%2 != 0 {
+ cv.Line.Warnf("Values for %s should always be pairs of paths.", cv.Varname)
+ }
+}
+
func (cv *VartypeCheck) Dependency() {
line, value := cv.Line, cv.Value
Index: pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go
diff -u pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go:1.15 pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go:1.16
--- pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go:1.15 Tue Dec 13 00:58:07 2016
+++ pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go Sun Jan 1 16:41:37 2017
@@ -82,6 +82,18 @@ func (s *Suite) Test_VartypeCheck_Commen
"WARN: fname:6: COMMENT should not be enclosed in quotes.\n")
}
+func (s *Suite) Test_VartypeCheck_ConfFiles(c *check.C) {
+ runVartypeChecks("CONF_FILES", opAssignAppend, (*VartypeCheck).ConfFiles,
+ "single/file",
+ "share/etc/config etc/config",
+ "share/etc/config etc/config file",
+ "share/etc/config etc/config share/etc/config2 etc/config2")
+
+ c.Check(s.Output(), equals, ""+
+ "WARN: fname:1: Values for CONF_FILES should always be pairs of paths.\n"+
+ "WARN: fname:3: Values for CONF_FILES should always be pairs of paths.\n")
+}
+
func (s *Suite) Test_VartypeCheck_Dependency(c *check.C) {
runVartypeChecks("CONFLICTS", opAssignAppend, (*VartypeCheck).Dependency,
"Perl",
Home |
Main Index |
Thread Index |
Old Index