Commit graph

2477 commits

Author SHA1 Message Date
rillig
119924e6f3 The .include lines in mk/tools/bsd.tools.mk changed, hence pkglint
didn't know the tools from the TOOLS framework anymore. Fixed that and
added some code that will detect such a change in the future.
2006-06-06 16:00:49 +00:00
rillig
3ee159f988 Completed the recent change by Stoned, who overlooked a second instance
of bsd.sites.mk in a comment.
2006-06-06 11:41:40 +00:00
rillig
1e457582de A variable that appears as a whole shell word may either be used as a
list of shell words, or sometimes as a single shell word. Compare: ${LD}
${LDFLAGS} and ./configure -libs ${LDFLAGS:Q}. So in this case, the :Q
operator cannot be checked reliably.
2006-06-06 11:39:25 +00:00
rillig
281a32dde2 Some small refinements. 2006-06-06 11:37:31 +00:00
seb
56cafd791c The new avatar of pkgsrc/mk/bsd.sites.mk is named pkgsrc/mk/fetch/sites.mk 2006-06-06 09:56:22 +00:00
rillig
1064108d2a Added the proper types for many of the variables that have been
unchecked before (mainly because of limitations in earlier pkglint
versions). Added ACL constants for user-defined, system-defined and
command-line variables.
2006-06-06 08:22:41 +00:00
rillig
52f5108b7c Enumerations don't need the :Q operator. 2006-06-06 07:04:56 +00:00
rillig
cf96b37f18 Improved variable_needs_quoting. 2006-06-06 06:48:16 +00:00
rillig
fcf3444e98 Updated pkglint to 4.64.
Changes since 4.63:

- Many diagnostics for the :Q operator have been wrong. They are currently
  left out, but will be re-added later. In the mean time, no diagnostics
  are better than wrong ones.
- Made defining the permissions for variables easier by providing a way to
  define "permission constants".
2006-06-06 05:36:40 +00:00
rillig
7e1a20676b When it is not clear whether the :Q operator should be used or not,
return dont_know instead of true.
2006-06-06 05:18:56 +00:00
rillig
870c059e4b Added the command line argument -D{foo,bar,...} that enables or disables
certain categories of debugging output.
2006-06-05 22:34:40 +00:00
rillig
2e5ea781f2 Minor corrections. 2006-06-05 22:24:12 +00:00
rillig
36aeee7541 Added an explanation for the warning that "Each sed command should
appear in an assignment of its own", since it had been misunderstood at
least once. Also, since the explanation is usually several lines long,
it does not hurt to add two extra empty lines to separate the
explanation from the actual warning.
2006-06-03 07:27:25 +00:00
rillig
6ee13c522e In Makefile.common, the standard list variables may be set using "="
instead of only appending with "+=".
2006-06-03 07:10:25 +00:00
rillig
b0b523a601 Added the possibility of defining custom ACLs in the file makevars.map. 2006-06-03 07:06:23 +00:00
rillig
8ed8d63862 Updated pkglint to 4.63.
Changes since 4.62:
- Improved checking of variable permissions.
- Improved detection of unused variables, for spell checking.
- Added warnings for variables that are used at load time but should not.
- Much code cleanup.
2006-06-03 06:09:40 +00:00
rillig
9c30cd8476 Improved the variable specification in makevars.map. Code cleanup. 2006-06-03 06:04:37 +00:00
joerg
4726a63c51 Add a wish for PYTHON_VERSIONS_INCOMPATIBLE. 2006-06-03 00:25:34 +00:00
rillig
5138f12646 Updated the TODO list. 2006-06-03 00:12:38 +00:00
rillig
a8d637a060 Run-time variables should not be used in load-time variables. 2006-06-02 21:54:00 +00:00
rillig
4d8957470c MASTER_SITE* may be used at run-time. Various other small changes. 2006-06-02 21:33:22 +00:00
rillig
b9a61e6bc7 Removed the subroutine type_should_be_quoted. In extract_used_variables,
a "." is allowed in the variable name. Changed two instances of log_note
to log_debug. Unmatched directives like .endif or .endfor are an error.
2006-06-02 21:32:33 +00:00
seb
daef8f3622 placate pkglint 2006-05-31 22:10:30 +00:00
seb
0271060d55 If I should be steward of one be it this one! 2006-05-31 22:04:55 +00:00
rillig
f1e866ee17 Using the := operator has subtle effects on the number of '$' characters
in strings. So don't use them.
2006-05-31 08:59:13 +00:00
rillig
c821274d36 Added a check for variables that are evaluated at load time. Especially
for lists of something, this can lead to unexpected behavior. Currently,
only the variables BUILDLINK_DEPENDS, BUILDLINK_PACKAGES and PKG_OPTIONS
may be looked at during load time.

This warning reveals the bad practice to "patch" CONFIGURE_ARGS at load
time, for example:

> CONFIGURE_ARGS:=      ${CONFIGURE_ARGS:S/--disable-esd/--enable-esd/}
WARN: audio/bmp-esound/Makefile:14: CONFIGURE_ARGS should not be
      evaluated at load time.
2006-05-31 08:46:00 +00:00
rillig
ef3ee853a6 Fixed indentation level in checkline_mk_vartype. 2006-05-31 08:10:45 +00:00
rillig
556a2de50b The checks for variable use and correct quoting have been concentrated
into a single subroutine, checkline_mk_varuse, which replaces the
various ad-hoc checks. Added the class PkgLint::VarUseContext that tries
to model the context in which a make(1) variable can appear. The checks
are much better now than before, but there's still work to do. Added a
new type FileMode for file permissions.

Currently no warnings are printed for untyped variables (that is,
user-defined and not following the common naming schemes). This includes
the iteration variables of .for loops. Since many of the warnings have
been overly strict, this is not a big loss.
2006-05-31 06:35:52 +00:00
rillig
f29df8e46f Some minor fixes and additions. 2006-05-31 02:15:50 +00:00
rillig
4f4a2d9eba SHLIB_HANDLING and USE_RMAN are deprecated. 2006-05-31 02:15:11 +00:00
wiz
0a4c0e72ee Remove EOL comments for packages which were uncommented; they
confused make.
2006-05-28 09:48:48 +00:00
joerg
0a90c3356e After some discussion with jlam and no objection raised by agc,
uncomment libnbcompat, mtree and xpkgwedge.
2006-05-26 19:58:47 +00:00
rillig
f4e8f5d9e5 Moved the code that guesses the type of a variable based on its name
into get_variable_type(). Added a new field PkgLint::Type::is_guessed
that can be checked later.
2006-05-23 11:12:25 +00:00
rillig
b8694492bf Prevented warnings when defining the new FETCH_MESSAGE. 2006-05-23 09:12:35 +00:00
rillig
ae90a923e0 - _FETCH_MESSAGE, BUILDLINK_RECOMMENDED.* and BUILDLINK_DEPENDS.* are
deprecated.
- CONFLICT is just a spelling mistake and therefore should not appear
  in the list of deprecated variables.
- Made handling of parameterized variables more uniform.
2006-05-23 08:59:47 +00:00
rillig
f8c029f6c9 The "future directions" chapter gives a vision of what pkglint may do if
I find too much time.
2006-05-23 08:10:37 +00:00
jlam
60f791e1e6 Move the check-shlibs target from bsd.pkg.mk to bsd.pkg.check.mk where
it will live with other "check" targets run after package installation.

Get rid of SHLIB_HANDLING, whose meaning had mutated over the years
from one thing to another.  Currently, it is used to basically note
whether the system's "ldd" command can be usefully run on the package's
binaries and libraries.  Rename this variable to CHECK_SHLIBS_SUPPORTED
for more clarity.

CHECK_SHLIBS is now a variable set exclusively by the user in /etc/mk.conf
to note whether the check for missing run-time search paths is performed
after a package is installed.  It defaults to "no" unless PKG_DEVELOPER
is set.
2006-05-22 22:22:02 +00:00
rillig
8f44969435 - When building the list of used variables, scan Makefile.* in addition
to *.mk.
2006-05-22 10:22:36 +00:00
rillig
732781c1b8 - Pkglint distinguishes between variables FOO and FOO.* now when checking
data types and permissions.
- Changed the way that permissions are determined a bit, so that
  unspecified permissions can be detected.
- Renamed -Wacl to -Wperm.
- When no applicable permissions are found, "?" is returned.
- When checking for unused variables, parameterized variables don't have to
  be matched exactly but only by basename.
- Added an explanation for the permissions warning.
2006-05-22 07:41:03 +00:00
rillig
f6bd1b991b Removed some drivel that was not appropriate for man pages. 2006-05-22 06:05:46 +00:00
rillig
0804d71fb0 - PLISTs should not contain perllocal.pod.
- Variables called *_HOME are assumed to contain a single pathname.
2006-05-21 15:46:43 +00:00
rillig
230833c180 Switching pkglint to OCaml looks feasible. 2006-05-20 14:26:00 +00:00
rillig
80e5ee2f45 Switching the programming language of pkglint to C++ is not an option. 2006-05-20 08:53:19 +00:00
rillig
c5c2956680 Reindented the whole program to fit my personal taste. 2006-05-19 23:38:12 +00:00
rillig
c5a6bf967c - Found three more instances where explain() had been called instead of
explain_warning(), which aborted the program.
- Added support for a wip-specific TODO file where suggested package
  updates are recorded.
2006-05-19 09:05:59 +00:00
rillig
79494065d4 Updated pkglint to 4.62.
Changes since 4.61:
- Bug fixes.
2006-05-16 22:18:59 +00:00
rillig
37a0972f57 bsd.options.mk may set PKG_OPTIONS. 2006-05-16 22:18:17 +00:00
rillig
1b764d1de7 Fixed a typo: $op cannot be "+", but sometimes is "+=". 2006-05-16 22:17:46 +00:00
rillig
b8cb56e04e Found two instances of explain() that had not been converted properly.
Fixed them. Added explain_note().
2006-05-15 21:37:04 +00:00
rillig
358636a86e Allow the compressed form of duplicate elimination for BUILDLINK_PACKAGES. 2006-05-15 07:20:45 +00:00