for directories starting with %D.
- Converted load_make_vars_typemap() to the common form of caching
subroutine. This makes pkglint about 10 percent faster.
- Added explanations for the :Q and the :M*:Q operators in Makefiles.
a single character. Seen in some package versions like "pkg-200211??".
- Allow the "," and the "@" in filenames.
- Allow the "gopher" scheme in URLs.
- Don't warn for unexpected PERL5_PACKLIST, bases on PKGNAME, if the latter
contains references to other variables.
- When PKGNAME is equal to DISTNAME, this is not a warning, only a note.
- Added a check for .include lines in all Makefiles and *.mk files to make
sure that only existant files are referenced and that pkgsrc packages do
not contain references to packages in pkgsrc-wip.
*.mk file is checked.
- Added warnings for unusual make targets. Everything except the usual
{pre,do,post}-* targets is considered unusual. Exceptions may be declared
in the Makefile using ".PHONY".
- The directives are checked to contain arguments if and only if needed.
- The .ifndef and .ifdef directives are marked as deprecated because
the parsing algorithm of NetBSD's make is so bad that it cannot
distinguish ".if" from ".ifdef".
- Added notes whenever ".undef" is used with a variable that had been used
in a ".for" loop before. Undefining the variable is simply unnecessary.
Changes since 4.46:
- Made the --explain command line option work.
- Added many explanations for existing diagnostics.
- Improved the diagnostics.
- In --autofix mode, no backup files are created anymore.
- Temporarily disabled the check for direct use of tool names.
- Fixed some false positive warnings.
- Added a check for the use of absolute pathnames in shell commands.
check had been removed some time ago due to the huge number of false
positives. Now that pkglint can parse shell commands quite well, it
has been reintroduced, as absolute pathnames often indicate unportable
features of a package. To implement this check (and a few others)
accurately, the whole code for checking shell commands has been
rewritten as a finite state machine.
warnings that LIST+=FOO=${FOO} should rather be LIST+=FOO=${FOO:Q}.
The cause was that I had added a capturing group in a regular
expression that also contained a back reference (\2). Adjusted the
back reference to \3. (This is the only place in pkglint where such
back references are used, so I don't have much experience with them.)
- Added the $line->replace() method for a convenient way to achieve simple
autofix tasks.
- When autofixing, no backup file is created (it had been created before).
1. Usually "cvs diff" is available.
2. All current autofixed changes are trivial.
3. The fixed file is first written to disk in a new file and then renamed
to the original file, greatly reducing the risk of data loss.
- Fixed a bug in checkdir_package(): In the call to load_package_Makefile(),
the last parameter had not been passed by reference, but by value.
Luckily this had not influenced any other part of pkglint.
- While there, I noticed that it is not necessary to pass some subroutines
the lines of all included Makefiles, so I removed that parameter.