Commit graph

532 commits

Author SHA1 Message Date
rillig
fe34e666fb When a list is appended to another list, like MAKE_ENV+=
CFLAGS=${CFLAGS}, check for the correct modifiers. The above is
obviously not correct, as CFLAGS may contain white-space.
CFLAGS=${CFLAGS:Q} is also a little wrong in that it may contain leading
and/or trailing white-space, which must be discarded, too, because the
broken GNU configure scripts cannot handle them correctly. This can be
done using ${CFLAGS:M*:Q}, which first splits CFLAGS into a list of
shell words, then selects all of them and finally combines the words
forming a nicely formatted string without leading and trailing
white-space where all entries are separated from each other by a single
space.
2005-11-23 06:05:52 +00:00
rillig
09ccc37a3a Updated pkglint to 4.45.1.
- Added a new type ShellWord that is used for MAKE_ENV and the like to
  check for invalid FOO="${VALUE}" additions. They really should be
  FOO=${VALUE:Q}, as they may already contain embedded quotes. This is
  especially important for CPPFLAGS and CFLAGS.
2005-11-23 05:18:46 +00:00
rillig
3ffb27719a Updated pkglint to 4.45.
- Fixed perl -T warnings:
  - Replaced $#{@{$lines}} with $#{$lines}.
  - Avoided calls to external programs (sed and digest).
- Removed redundant warning if DISTNAME is set to an invalid package name
  and PKGNAME is not defined.
- Changed dependency from pkgtools/digest to security/p5-Digest-SHA1.
2005-11-21 22:06:30 +00:00
rillig
10c9716bc9 Fixed a syntax error. I had forgotten to begin a comment with a "#". 2005-11-21 07:24:51 +00:00
rillig
6efa75eb39 Updated pkglint to 4.44.
Changes since 4.43:
- Removed the remaining code that had been imported from FreeBSD's
  portlint.
- Removed the (undocumented) -Wvague option.
- Removed the -Wexec and -Wparen options. The latter had no effect at all,
  and the former cannot lead to false positives, so it is always enabled.
- Variable names starting with an underscore are reserved for internal
  pkgsrc use.
- Added some more type checks.
2005-11-20 20:09:35 +00:00
rillig
910a64aaed Reworked the in-file documentation on pkglint. Added section headings.
Renamed some subroutines to fit into the general scheme.
2005-11-20 19:58:46 +00:00
rillig
637bf9e082 Removed the (undocumented) -Wvague option. All diagnostics that had been
depending on this option have been converted to modern code, although it
can still be improved.
2005-11-20 19:04:20 +00:00
rillig
c4795a075c Don't print warnings for unknown "empty" directories like pkg/ and scripts/
that occur during "cvs update"s.
2005-11-20 13:59:37 +00:00
rillig
9ba2c80228 Updated pkglint to 4.43.2.
- Renamed the type Dependency to DependencyWithPath.
- Added new types Dependency, PlatformTuple and RelativePkgDir.
- Added some of the common variables to the list of typed variables.
2005-11-20 13:14:17 +00:00
rillig
b06833b0b6 Use $conf_pkgsrcdir instead of hard-coded "/usr/pkgsrc". 2005-11-20 12:32:17 +00:00
rillig
03c36b46c4 Added the $conf_make variable to solve compile-time errors. 2005-11-20 12:27:18 +00:00
rillig
99e0d66756 Updated lintpkgsrc to 4.43.1.
- In BATCH mode, that is for the bulk builds, hardcode PKGSRCDIR as
  /usr/pkgsrc. Otherwise take ${PKGSRCDIR}.
2005-11-20 10:55:43 +00:00
rillig
5cf5e4b62f Don't report *_MK variables as unchecked. 2005-11-20 10:07:45 +00:00
rillig
c790505a33 Variable names starting with an underscore are reserved for internal
pkgsrc use.
2005-11-19 19:28:06 +00:00
rillig
e6069e52f8 Code cleanup.
- Removed some of the old checks.
- Replaced some of the old checks with modern code.
- Replaced some of the old checks with TODO markers.
2005-11-19 19:18:56 +00:00
rillig
b92397af64 Replaced the special purpose variable $seen_USE_PKGLOCALEDIR with the
$makevar table. This allows for easy checks that involve more than only
one variable.
2005-11-19 18:26:32 +00:00
rillig
3fa3f9f6a3 Removed the old EXTRACT_SUFX check. 2005-11-19 17:58:12 +00:00
rillig
5a42297464 Don't complain if no MAINTAINER is given. 2005-11-19 17:54:37 +00:00
rillig
562cdf5268 Updated pkglint to 4.43.
Changes since 4.42:
- Reduced the number of duplicate diagnostics when checking multiple files.
  Only diagnostics concerning the current package are printed.
- Added checks for EXTRACT_SUFX and PKG_INSTALLATION_TYPES.
- Added a work-around for the PHP patches warnings.
- PERL5_PACKLIST should not contain references to other variables.
- Added the -s|--source command line option to show the code along with the
  diagnostics.
- Fixed a bug in get_logical_line(); logical lines have not had their
  physical lines attached.
- Deprecated variables are not only checked when they are defined but also
  when they are used.
2005-11-19 17:22:21 +00:00
rillig
9e07829918 Updated pkglint to 4.42.2.
- Added a check that PERL5_PACKLIST does not contain references to other
  variables. Some packages have ${PERL5_SITEARCH} in it, which results in
  a double slash, and the CHECK_FILES framework cannot handle this.
2005-11-19 13:34:41 +00:00
rillig
a1247dd801 Values in SUBST_CLASSES may be tool names. 2005-11-15 13:48:42 +00:00
rillig
3f52be8402 USE_JAVA2 may be "YES", too. 2005-11-15 13:42:50 +00:00
rillig
e0161be7eb Removed the (vague) check for "nb\d+" in DISTNAME. 2005-11-15 13:37:55 +00:00
rillig
e60dd8de73 Updated pkglint to 4.42.1.
Added a work-around for the warnings from PHP modules when including
lang/php/ext.mk.
2005-11-15 03:10:20 +00:00
rillig
b8c93f2e88 The last change was a bad idea. Reverted it partly. Now pkglint -I shows
the whole file with included files again, but the checks are only done
against the main Makefile.
2005-11-14 16:49:20 +00:00
rillig
84daccf125 WRKSRC is of type WrkdirSubdirectory, but no new checks are added. 2005-11-14 13:03:32 +00:00
rillig
b833d407cc - EXTRACT_SUFX is of type DistSuffix. 2005-11-14 12:51:57 +00:00
rillig
5b6ded4f08 The readmakefile() subroutine only returns the lines of the main Makefile
in the $all_lines parameter, but the whole text of the included files in
the $whole parameter.

This change avoids duplicate diagnostics for *.mk and Makefile* in the
package directory. A side effect is that package authors only get the
diagnostics they can probably fix, as diagnostics from included files are
not given.
2005-11-14 12:32:58 +00:00
rillig
b4f8c1132f Updated pkglint to 4.42.
Changes since 4.41:
- In .mk files, line continuations are properly handled.
- An open bracket is allowed in variable and tool names.
- Added checks for ALTERNATIVES and INSTALL/DEINSTALL files.
- By default, don't check files in ${FILESDIR}.
- Warn about unknown file and directory names.
2005-11-14 11:45:52 +00:00
rillig
250b0281ae - File::stat is used instead of the -d and -f operators to get the file
mode in checkitem().
2005-11-14 05:57:54 +00:00
rillig
72af8b9eac When checking for the existence of a dependency, use
${pkgsrcdir}/${PKGPATH} instead of ${current_dir}/../../${PKGPATH}.
2005-11-14 04:47:44 +00:00
rillig
bd4c20a0a1 - Allow an opening bracket in variable names and tool names. 2005-11-14 04:38:27 +00:00
rillig
08701c7d25 When loading .mk files, lines are properly converted into logical lines. 2005-11-14 04:30:31 +00:00
rillig
bf194ac42e Made sure that global variables are only accessed if they are defined.
Checking individual files is no longer experimental.
2005-11-14 04:24:14 +00:00
rillig
bc0aa35a22 Updated pkglint to 4.41.
- Documented the --recursive option.
- Added an option -Cmk for checking .mk files besides buildlink3.mk.
- pkglint can handle individual files on the command line, not only
  packages. (experimental)
- Replaced checkfile_buildlink3_mk() with checkfile_mk().
- Factored out the checkfile() subroutine from checkdir_package().
2005-11-14 04:05:22 +00:00
rillig
50e33be5f5 - Improved the way the tool names are detected once more. 2005-11-10 19:47:41 +00:00
rillig
72aa168b19 Updated pkglint to 4.40.
- Removed all references to the build-time pkgsrc directory, ${PKGSRCDIR}.
  This makes the binary package independent of the build location.
  Fixes PR 32006.
2005-11-10 14:30:56 +00:00
rillig
e19e0913cd Moved the checks for the COMMENT from checklines_package_Makefile() to
checktext_basic_vartype() to shorten the former subroutine.
No user-visible changes.
2005-11-10 12:04:11 +00:00
rillig
bfe651305d - Improved the detection of tool names once more. 2005-11-10 11:14:03 +00:00
rillig
f619b2875c Updated pkglint to 4.39.
Changes since 4.38:
- Disabled the check on Makefile variable order, as the discussion on
  tech-pkg has not finished yet.
- Improved detection of valid tool names.
- Improved detection of direct use of tool names. (Less false positives.)
- Improved the diagnostics for direct use of tool names.
2005-11-10 11:03:57 +00:00
rillig
b0884ccf36 Updated pkglint to 4.38.4.
- Improved detection of valid tool names.
- In the post-install target, output does to stderr instead of stdout.
2005-11-10 10:26:46 +00:00
rillig
b0d7992a4c Added (currently disabled) code to scan for variable names in
pkgsrc/mk/defaults/mk.conf. All those variable names are then checked as
being of type Userdefined. As that file is currently too unstructured
and contains too much garbage, this check cannot yet be enabled.
2005-11-10 07:46:24 +00:00
rillig
20e8563c6a Removed the -l command line option from lintpkgsrc(1). Use "pkglint -r"
instead.
2005-11-08 23:05:22 +00:00
rillig
b0ee766802 Updated pkglint to 4.38.2.
- pkglint(1) does not use the hard-coded PKGSRCDIR anymore.

This fix is related to PR 32006, but doesn't fix it, since the PR is
about lintpkgsrc(1), not pkglint(1).
2005-11-08 22:55:22 +00:00
rillig
aad6e5d4eb - Disable checking for variable names starting with an underscore. Due
to the lang/perl5 package there have been more than 19000 new error
  lines in the diagnostics of the complete pkgsrc tree.
2005-11-08 22:27:12 +00:00
rillig
f028caef78 Fixed a typo ($line->error -> $line->log_error). 2005-11-08 21:13:43 +00:00
rillig
b9cc275c78 Updated pkglint to 4.38.1.
- It is an error if packages define a variable whose name starts with an
  underscore.
- Removed the (vague) "wip" check, as it has been replaced by special checks for
  DEPENDS and .include directives.
- Disabled the check for variable ordering until the discussion on tech-pkg
  has led to any results.
2005-11-08 21:09:48 +00:00
rillig
7428daea90 Updated pkglint to 4.38.
- PKGNAME is checked for being a valid package name.
- PLIST files should not contain filenames that match */CVS/*.
- Completely rewrote the check for variable ordering. The new code
  operates on a data structure that's easily understandable and
  extendable (see the source for an example). It also generates greatly
  improved diagnostics. As the old code had been enabled only when
  checking with -Wvague or -Wall, it has been seldom used anyway.
2005-11-07 00:45:01 +00:00
rillig
f6f03b2d1e Added a note that SUBST_SED might be changed to a List instead of a
List* later.
2005-11-06 15:54:06 +00:00
rillig
5bcd0d42ba Updated pkglint to 4.37.2.
- Removed the hard-coded values for valid tool names.
  The detection is good enough.
- Make sure that the domain part NetBSD.org is written like this
  in mail addresses.
2005-11-05 11:02:53 +00:00