pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/pkglint



Module Name:    pkgsrc
Committed By:   rillig
Date:           Tue Jan 12 01:02:49 UTC 2016

Modified Files:
        pkgsrc/pkgtools/pkglint: Makefile
        pkgsrc/pkgtools/pkglint/files: buildlink3.go buildlink3_test.go
            category.go check_test.go dir.go distinfo.go distinfo_test.go
            expecter.go files.go files_test.go getopt.go globaldata.go
            globaldata_test.go globalvars.go licenses.go licenses_test.go
            line.go line_test.go logging.go main.go main_test.go mkline.go
            mkline_test.go package.go package_test.go patches.go
            patches_test.go pkglint.0 pkglint.1 pkglint.go pkglint_test.go
            plist.go plist_test.go shell.go shell_test.go substcontext.go
            substcontext_test.go toplevel.go toplevel_test.go tree.go util.go
            util_test.go vardefs.go vartype.go vartype_test.go vartypecheck.go
            vartypecheck_test.go vercmp.go vercmp_test.go
Added Files:
        pkgsrc/pkgtools/pkglint/files: category_test.go dir_test.go mklines.go
            mklines_test.go parser.go parser_test.go
Removed Files:
        pkgsrc/pkgtools/pkglint/files: deprecated.go deprecated_test.go
            descr.go descr_test.go makefiles.go makefiles_test.go mkcond.go
            mkcond_test.go mkcontext.go pkgcontext.go vars.go vars_test.go
            varusecontext.go varusecontext_test.go

Log Message:
Updated pkglint to 5.3

Changes since 5.2.2.2:

* Makefile variables

The warnings about missing permissions sound more natural than before
and give a hint for alternative operators (e.g. set-default instead
of append), or an alternative file where setting this variable is
allowed instead (e.g. PKGREVISION may not be set in Makefile.common,
but in Makefile it is ok).

Warnings about "unknown" allowed permissions are not shown anymore,
since they didn't provide any benefit. To see them again, pkglint must
be run with the -Dunchecked option.

User-defined variables may be used by builtin.mk. They may also be
used during load time, not only during run time, under the assumption
that in most cases the bsd.prefs.mk has already been loaded.

Some individual variables may be defined or used in places where this
was not allowed before. CHECK_BUILTIN.*, BUILDLINK_TARGETS,
TOOLS_DEPENDS.*, BUILDLINK_DEPMETHOD.*, SUBST_CLASSES.

A new parser for Makefile expressions detects and reports more
mistakes than bmake itself. Currently it is only used to check the
basic syntax; more applications are possible.

* PLIST

In PLIST files, conditionals of the form ${PLIST.*} are recognized and
are not part of the pathname. This allows pkglint to better check for
missing manual pages and correctly sorted PLIST files.

In --autofix mode, pkglint can sort PLIST files, which makes these
rather annoying warnings easy to fix.

No more warnings for man pages whose filename doesn't match exactly
the section, e.g. man/man3/exit.3c.

* Patches

The code for checking patch files has been completely rewritten, so
that it is easier understandable and well-structured. As an additional
benefit, it also became faster. Support for context diffs has been
dropped to a minimum, since they are not popular anymore.

Pkglint no longer warns about missing trailing whitespace in a line,
since all patch programs can handle these lines. It also doesn't
request empty lines between multiple diffs in a single file, since
that is simply not necessary.

Pkglint is picky when a patch file continues after the diff with some
text that still looks like a diff, since that means the patch doesn't
do what it looks like on first sight
(example: audio/faad2/patches/patch-au).

* Distinfo

When a patch file listed in distinfo cannot be found in the
filesystem, this is reported clearly instead of complaining about
missing SHA512 hashes (example: audio/libopus).

The inter-package distinfo check that verifies whether a distfile has
different hashes has been enabled. It had been disabled before, but
unintentionally so.

* Misc

- The check for COMMENT has been updated to reflect the changed
  default value from url2pkg.
- BUILDLINK_API_DEPENDS.* may be set in buildlink3.mk, even if the
  package is not the current one. (The other variables may be only set
  for the current package.)
- In shell commands, the escape sequence \. (and similar ones, which
  are often seen in sed(1) commands) no longer produces a warning,
  since the different shells handle these escape sequences
  consistently. (It is the echo(1) implementations that actually
  differ, therefore this warning was superfluous.)
- Compiler flags in backticks (typically `pkg-config --cflags`) are
  properly recognized.
- Internal pkglint errors when parsing shell commands have been fixed.
- No more warnings about PKGCONFIG_FILE.* being defined but unused.
- Dependencies of the form pkgbase>=1.0<5.0 are recognized.
- Diagnostics use quotes more often to indicate the placeholders.
- The type of GENERATE_PLIST has been changed from List of ShellWord
  to ShellCommands, since that is what the variable is really about.
- The type ShellCommand used to mean "a shell command line in a
  Makefile", which was confusing. Now it means what the name says,
  which reduces the wrong warnings for variables like CC (example:
  x11/kdebase3/options.mk).
- Improved buildlink3.mk checks to generate more helpful diagnostics.
- Fixed the parsing of dependency patterns, so that all but the most
  exotic ones are properly recognized.
- Fixed the parsing of shell variables of the form ${var%.c}.
- Updated the check for the default COMMENT from url2pkg.
- Many more small improvements.
- Performance has improved again, though only a little bit.
- Unit test coverage has increased from 64.2 % to 78.9 %.

This fixes most of the points mentioned in PR pkg/46570.


To generate a diff of this commit:
cvs rdiff -u -r1.474 -r1.475 pkgsrc/pkgtools/pkglint/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/pkglint/files/buildlink3.go \
    pkgsrc/pkgtools/pkglint/files/globalvars.go \
    pkgsrc/pkgtools/pkglint/files/licenses_test.go \
    pkgsrc/pkgtools/pkglint/files/main_test.go \
    pkgsrc/pkgtools/pkglint/files/toplevel_test.go \
    pkgsrc/pkgtools/pkglint/files/tree.go \
    pkgsrc/pkgtools/pkglint/files/vartype_test.go \
    pkgsrc/pkgtools/pkglint/files/vercmp.go \
    pkgsrc/pkgtools/pkglint/files/vercmp_test.go
cvs rdiff -u -r1.2 -r1.3 pkgsrc/pkgtools/pkglint/files/buildlink3_test.go \
    pkgsrc/pkgtools/pkglint/files/dir.go \
    pkgsrc/pkgtools/pkglint/files/expecter.go \
    pkgsrc/pkgtools/pkglint/files/files_test.go \
    pkgsrc/pkgtools/pkglint/files/licenses.go \
    pkgsrc/pkgtools/pkglint/files/main.go \
    pkgsrc/pkgtools/pkglint/files/package.go \
    pkgsrc/pkgtools/pkglint/files/package_test.go \
    pkgsrc/pkgtools/pkglint/files/patches_test.go \
    pkgsrc/pkgtools/pkglint/files/toplevel.go \
    pkgsrc/pkgtools/pkglint/files/util_test.go
cvs rdiff -u -r1.3 -r1.4 pkgsrc/pkgtools/pkglint/files/category.go \
    pkgsrc/pkgtools/pkglint/files/getopt.go \
    pkgsrc/pkgtools/pkglint/files/globaldata_test.go \
    pkgsrc/pkgtools/pkglint/files/line_test.go \
    pkgsrc/pkgtools/pkglint/files/logging.go \
    pkgsrc/pkgtools/pkglint/files/pkglint_test.go \
    pkgsrc/pkgtools/pkglint/files/plist.go \
    pkgsrc/pkgtools/pkglint/files/plist_test.go \
    pkgsrc/pkgtools/pkglint/files/substcontext_test.go \
    pkgsrc/pkgtools/pkglint/files/vardefs.go
cvs rdiff -u -r0 -r1.1 pkgsrc/pkgtools/pkglint/files/category_test.go \
    pkgsrc/pkgtools/pkglint/files/dir_test.go \
    pkgsrc/pkgtools/pkglint/files/mklines.go \
    pkgsrc/pkgtools/pkglint/files/mklines_test.go \
    pkgsrc/pkgtools/pkglint/files/parser.go \
    pkgsrc/pkgtools/pkglint/files/parser_test.go
cvs rdiff -u -r1.5 -r1.6 pkgsrc/pkgtools/pkglint/files/check_test.go \
    pkgsrc/pkgtools/pkglint/files/distinfo.go \
    pkgsrc/pkgtools/pkglint/files/globaldata.go \
    pkgsrc/pkgtools/pkglint/files/mkline_test.go \
    pkgsrc/pkgtools/pkglint/files/pkglint.go
cvs rdiff -u -r1.2 -r0 pkgsrc/pkgtools/pkglint/files/deprecated.go \
    pkgsrc/pkgtools/pkglint/files/deprecated_test.go \
    pkgsrc/pkgtools/pkglint/files/mkcontext.go \
    pkgsrc/pkgtools/pkglint/files/pkgcontext.go
cvs rdiff -u -r1.1 -r0 pkgsrc/pkgtools/pkglint/files/descr.go \
    pkgsrc/pkgtools/pkglint/files/descr_test.go \
    pkgsrc/pkgtools/pkglint/files/makefiles_test.go
cvs rdiff -u -r1.4 -r1.5 pkgsrc/pkgtools/pkglint/files/distinfo_test.go \
    pkgsrc/pkgtools/pkglint/files/files.go \
    pkgsrc/pkgtools/pkglint/files/substcontext.go \
    pkgsrc/pkgtools/pkglint/files/util.go \
    pkgsrc/pkgtools/pkglint/files/vartype.go \
    pkgsrc/pkgtools/pkglint/files/vartypecheck_test.go
cvs rdiff -u -r1.7 -r1.8 pkgsrc/pkgtools/pkglint/files/line.go \
    pkgsrc/pkgtools/pkglint/files/patches.go \
    pkgsrc/pkgtools/pkglint/files/shell.go
cvs rdiff -u -r1.8 -r0 pkgsrc/pkgtools/pkglint/files/makefiles.go
cvs rdiff -u -r1.3 -r0 pkgsrc/pkgtools/pkglint/files/mkcond.go \
    pkgsrc/pkgtools/pkglint/files/vars.go \
    pkgsrc/pkgtools/pkglint/files/vars_test.go \
    pkgsrc/pkgtools/pkglint/files/varusecontext.go \
    pkgsrc/pkgtools/pkglint/files/varusecontext_test.go
cvs rdiff -u -r1.4 -r0 pkgsrc/pkgtools/pkglint/files/mkcond_test.go
cvs rdiff -u -r1.6 -r1.7 pkgsrc/pkgtools/pkglint/files/mkline.go \
    pkgsrc/pkgtools/pkglint/files/shell_test.go
cvs rdiff -u -r1.35 -r1.36 pkgsrc/pkgtools/pkglint/files/pkglint.0
cvs rdiff -u -r1.49 -r1.50 pkgsrc/pkgtools/pkglint/files/pkglint.1
cvs rdiff -u -r1.8 -r1.9 pkgsrc/pkgtools/pkglint/files/vartypecheck.go

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index