Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Having duplicate expanded strings is not as bad as having missed
alternatives, it's only a question of performance.
|
|
|
|
|
|
|
|
|
|
When running 'lintpkgsrc -I tmp/lp-85 -yro', lintpkgsrc couldn't find
the cache file due to the intermediate chdir($pkgdistdir).
|
|
|
|
|
|
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.
|
|
In Perl, 0 is falsy, but in bmake, the modifier ':U' only cares about
undefined vs. defined.
|
|
|
|
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.
|
|
It was easily possible to confuse scan_pkgsrc_makefiles with
load_pkgsrc_makefiles, so rename the latter to load_pkgdb_from_cache.
|
|
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.
|
|
Having a variable named 'false' was confusing. Having a stack of
if-states in which 0 means true and 1 means false was even more
confusing. Using these magic numbers in the debug log without any
explanation was misleading.
The code, as well as the debug log, now uses the strings 'not_yet',
'active' and 'done' for the state of the conditionals. While it still
requires a bit of thought to read the debug log, it's at least possible
now.
|
|
|
|
Changes since 2022.08.10:
Improve parsing of conditions, continuation lines, comments in
makefiles.
Replace hard-coded paths to /etc/mk.conf and /usr/pkg with the proper
paths that correspond to the pkgsrc installation.
If pkglint is run with unknown or invalid options, exit with an error
status.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It has been replaced with conf_makeconf.
|
|
|
|
|
|
No matter whether lintpkgsrc is built in batch mode, its PREFIX must
always be the actual prefix, not the hardcoded /usr/pkg, as there may
also be bulk builds with --prefix=/opt/pkg. Same for mk.conf.
|
|
Previously, evaluating the conditions was a wild mixture of concepts
taken from bmake's cond.c, without attention to detail. For example, in
the condition 'exists(VAR:Mpattern)', the ':Mpattern' doesn't make any
sense, still lintpkgsrc parsed it as a modifier.
Instead of evaluating the ':M' modifier only in conditions, a better
idea is to have a general subroutine that expands an arbitrary strings,
taking care of all kinds of modifiers.
While the previous code was conceptually wrong, the number of practical
difference is small. Still, it's better to be precise and accurate,
there are enough places with bad heuristics in the rest of the
lintpkgsrc code.
|
|
Bump version.
|
|
Mostly remove redundant punctuation around 'push' and 'defined'.
|
|
|
|
|
|
Unknown lines are written to the debug log.
|
|
|
|
|
|
|
|
Previously, the search path was in pseudo-random order.
|
|
|
|
|
|
|
|
|
|
It is used for evaluating expression modifiers of the form
':S,from,to,'.
Bump version.
|
|
|
|
With small changes, the subroutine for storing the cache can be
restricted to the public API of the types PkgDb, Pkgs and PkgVer. This
way, the 'store' subroutines no longer need to be part of the classes.
Implementing the code in a single external subroutine saves a few lines
of code.
The order of the PkgVer entries in the cache file changes, everything
else is as before.
|
|
|
|
|
|
Broken since lintpkgsrc.pl 1.44 from yesterday. All package variables
were stored as empty strings instead of their actual values.
|
|
|