summaryrefslogtreecommitdiff
path: root/pkgtools/lintpkgsrc
AgeCommit message (Collapse)AuthorFilesLines
2022-09-29lintpkgsrc: fix search path for mk.confrillig1-3/+3
The variable MAKECONF has the highest precedence, not the lowest one. Bump version.
2022-09-14pkgtools/lintpkgsrc: ignore exit status from running pkg_inforillig2-4/+8
In case of multi-versioned packages like Python modules, lintpkgsrc queries the wrong installed packages. Bump version. https://mail-index.netbsd.org/pkgsrc-users/2022/09/13/msg036186.html
2022-08-19lintpkgsrc: fix location of mk.confrillig2-4/+20
The effective location of mk.conf is not stored in a variable, and there are several locations where it could be. Noticed by adam@.
2022-08-19lintpkgsrc: cleanup: extract 'make show-vars' into subroutinerillig1-23/+27
2022-08-19lintpkgsrc: fix parse-guessing of Apache modulesrillig1-2/+3
When lintpkgsrc parses the package makefile of an Apache module, it includes mk/apache.mk, and that file defines APACHE_PKG_PREFIX, thereby hiding the fallback value from $default_vars.
2022-08-19lintpkgsrc: fix handling of Apache modulesrillig1-2/+2
2022-08-18lintpkgsrc: fix warning about bogus PKGREVISION for Git packagesrillig1-2/+2
(Since a few days.)
2022-08-18lintpkgsrc: clean up stylerillig1-10/+7
2022-08-18lintpkgsrc: cleanup: replace '|| fail' with 'or fail'rillig1-7/+7
2022-08-18lintpkgsrc: remove special rule for RESTRICTEDrillig1-5/+1
There's no point in saving the fixed value 'NO_BIN_ON_FTP' in the variable 'RESTRICTED'. The purpose of that code was unclear, as all packages that define NO_BIN_ON_FTP also define RESTRICTED.
2022-08-18lintpkgsrc: normalize package name for Apache Web Server modulesrillig1-1/+3
2022-08-17lintpkgsrc: fix default value of LOCALBASErillig1-2/+2
LOCALBASE is not related to PKGSRCDIR in any way.
2022-08-17lintpkgsrc: cleanup: remove redundant punctuation around declarationsrillig1-13/+11
2022-08-17lintpkgsrc: prefer clarity over brevity in usage messagerillig1-3/+3
2022-08-17lintpkgsrc: cleanup: untangle parsing of .include directivesrillig1-19/+22
2022-08-17lintpkgsrc: cleanup: reduce syntactical verbosityrillig1-16/+11
2022-08-17lintpkgsrc: add error handling for files and subprocessesrillig1-11/+10
2022-08-17lintpkgsrc: cleanup: reduce indentation of parse_makefile_pkgsrcrillig1-40/+37
2022-08-17lintpkgsrc: cleanup: condense guess-parsing of PKGNAMErillig1-15/+8
2022-08-17lintpkgsrc: fix parse-guessing of pkgsrc-wip packages using an SCMrillig1-3/+7
2022-08-17lintpkgsrc: eliminate common subexpression when parsing packagerillig1-11/+11
2022-08-17lintpkgsrc: fix loading of package data; condense loading of categoriesrillig1-6/+4
2022-08-17lintpkgsrc: cleanup: move loading and storing of package data togetherrillig2-53/+52
2022-08-16lintpkgsrc: cleanup: rename PkgDb to PkgDatarillig2-64/+64
The previous name could be confused with the pkgdb directory that holds information about the currently installed packages.
2022-08-16lintpkgsrc: improve PKGNAME guessing for PHP, Python, Ruby packagesrillig1-2/+11
2022-08-16lintpkgsrc: fix PKGNAME guessing for Lua packagesrillig1-1/+4
Previously, the guessed PKGNAME of devel/lua-busted was '-busted-2.0.0', now it is 'lua-busted-2.0.0'.
2022-08-16lintpkgsrc: cleanup: condense invalid_versionrillig1-29/+21
2022-08-16lintpkgsrc: cleanup: condense package_globmatchrillig1-21/+13
2022-08-16lintpkgsrc: cleanup: rename subroutinerillig1-6/+6
Scanning the distfiles is not the main action.
2022-08-16lintpkgsrc: don't chdir unnecessarilyrillig1-9/+9
Previously, combining the options '-u' and '-E relative-path' did not work.
2022-08-16lintpkgsrc: split remove_distfiles into manageable piecesrillig1-63/+72
2022-08-16lintpkgsrc: clean up loading distfiles for installed packagerillig1-21/+10
2022-08-16lintpkgsrc: separate loading distinfo from checking distinforillig1-37/+53
While here, change the message for checksum mismatch, once again. No other functional change.
2022-08-15lintpkgsrc: clean up stylisticallyrillig1-65/+50
2022-08-15lintpkgsrc: clean up code for listing required packagesrillig1-14/+5
2022-08-14lintpkgsrc: remove preformatted manual pagerillig2-143/+2
Having the preformatted manual page checked in into version control doesn't make sense. Replacing the placeholders is an ugly hack and leads to ugly line breaks. If the preformatted manual page is needed, the better approach is to render it at build time, after the placeholders have been replaced.
2022-08-14lintpkgsrc: accept duplicate strings from brace expansion, for nowrillig2-6/+5
Having duplicate expanded strings is not as bad as having missed alternatives, it's only a question of performance.
2022-08-14lintpkgsrc: demonstrate another bug in brace expansionrillig1-1/+3
2022-08-14lintpkgsrc: fix brace expansion for empty alternativesrillig2-6/+4
2022-08-14lintpkgsrc: fix handling of 0 in brace expansionsrillig2-8/+5
2022-08-14lintpkgsrc: extract brace expansion, document its various bugsrillig2-16/+44
2022-08-14lintpkgsrc: properly clean up after chdirrillig1-2/+3
When running 'lintpkgsrc -I tmp/lp-85 -yro', lintpkgsrc couldn't find the cache file due to the intermediate chdir($pkgdistdir).
2022-08-14lintpkgsrc: clean up variable names and verbose/debug log messagesrillig1-27/+26
2022-08-14lintpkgsrc: clean up debug loggingrillig1-30/+29
2022-08-13lintpkgsrc: update to 2022.08.13rillig1-2/+2
Changes since 2022.08.12: In package makefiles, the ':U' modifier is evaluated more correctly than before, handling the values '' and '0' correctly. Running 'lintpkgsrc --help' produces a clean usage message. Distinfo files are checked more strictly than before. Running 'lintpkgsrc -D .' does not produce Perl warnings anymore when falling back to running bmake to determine the PKGNAME. When parsing package makefiles, the debug log for evaluating conditionals is easier to read.
2022-08-13lintpkgsrc: fix expansion of the ':U' modifierrillig5-16/+58
In Perl, 0 is falsy, but in bmake, the modifier ':U' only cares about undefined vs. defined.
2022-08-13lintpkgsrc: clean up the output of running 'lintpkgsrc --help'rillig1-2/+2
2022-08-13lintpkgsrc: make distinfo parsing stricterrillig1-31/+40
There are no distinfo files anymore in which the filename starts with './', so remove that check. Complain about invalid distinfo lines. This flags a few pkgsrc-wip packages, but none in main pkgsrc. Extract load_distinfo into a separate subroutine, improve local variable names. Document that only the first distinfo algorithm (currently BLAKE2s) is ever checked.
2022-08-13lintpkgsrc: cleanup: rename cache subroutines to be more expressiverillig2-17/+13
It was easily possible to confuse scan_pkgsrc_makefiles with load_pkgsrc_makefiles, so rename the latter to load_pkgdb_from_cache.
2022-08-13lintpkgsrc: remove extra code for determining the pkg_install versionrillig1-11/+4
There is no apparent reason for this code. Lintpkgsrc could already parse the version of pkg_install, by falling back to running bmake. When run in debug mode, 'lintpkgsrc -D .' failed because lintpkgsrc used a wrong regular expression instead of just calling dirname. While here, fix the variable name 'pkgsrcdir' to simply 'pkgdir', as the previous name was highly confusing.