diff options
author | rillig <rillig@pkgsrc.org> | 2018-05-19 12:58:24 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2018-05-19 12:58:24 +0000 |
commit | 10e31a77f5bedd47a23b18f14b89784be2bd2a72 (patch) | |
tree | 8060e5c513bcdb506c0997a82514d210c729fd5d /pkgtools/pkglint/files/package.go | |
parent | 7cdb46ad2faac9332036fadbd8ef15ca6bebfd7e (diff) | |
download | pkgsrc-10e31a77f5bedd47a23b18f14b89784be2bd2a72.tar.gz |
pkgtools/pkglint: update to 5.5.12
Changes since 5.5.11:
* Improve support for TEST_DEPENDS and USE_TOOLS+= *:test (thanks @leot)
* Add checks for ALTERNATIVES files
Diffstat (limited to 'pkgtools/pkglint/files/package.go')
-rw-r--r-- | pkgtools/pkglint/files/package.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgtools/pkglint/files/package.go b/pkgtools/pkglint/files/package.go index cc79fdf70a4..f0a9e7e495e 100644 --- a/pkgtools/pkglint/files/package.go +++ b/pkgtools/pkglint/files/package.go @@ -26,6 +26,7 @@ type Package struct { EffectivePkgnameLine MkLine // The origin of the three effective_* values SeenBsdPrefsMk bool // Has bsd.prefs.mk already been included? PlistDirs map[string]bool // Directories mentioned in the PLIST files + PlistFiles map[string]bool // Regular files mentioned in the PLIST files vars Scope bl3 map[string]Line // buildlink3.mk name => line; contains only buildlink3.mk files that are directly included. @@ -42,6 +43,7 @@ func NewPackage(pkgpath string) *Package { pkg := &Package{ Pkgpath: pkgpath, PlistDirs: make(map[string]bool), + PlistFiles: make(map[string]bool), vars: NewScope(), bl3: make(map[string]Line), plistSubstCond: make(map[string]bool), @@ -216,6 +218,14 @@ func (pkglint *Pkglint) checkdirPackage(pkgpath string) { } } + if G.opts.CheckAlternatives { + for _, fname := range files { + if path.Base(fname) == "ALTERNATIVES" { + CheckfileAlternatives(fname, pkg.PlistFiles) + } + } + } + if !isEmptyDir(G.CurrentDir + "/scripts") { NewLineWhole(G.CurrentDir + "/scripts").Warnf("This directory and its contents are deprecated! Please call the script(s) explicitly from the corresponding target(s) in the pkg's Makefile.") } @@ -934,6 +944,7 @@ func (pkg *Package) loadPlistDirs(plistFilename string) { for _, line := range lines { text := line.Text + pkg.PlistFiles[text] = true // XXX: ignores PLIST conditionals for now // Keep in sync with PlistChecker.collectFilesAndDirs if !contains(text, "$") && !contains(text, "@") { for dir := path.Dir(text); dir != "."; dir = path.Dir(dir) { |