Allow "." in package names (needed e.g. for gst-plugins0.10-base).
Check package patterns in DEPENDS. Requested by diro in PR 46570. Bump version.
This commit is contained in:
parent
30b668671a
commit
19b1dc413d
2 changed files with 15 additions and 7 deletions
|
@ -1,10 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.403 2012/07/09 17:37:48 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.404 2012/07/09 18:14:35 wiz Exp $
|
||||
#
|
||||
|
||||
# Note: if you update the version number, please have a look at the
|
||||
# changes between the CVS tag "pkglint_current" and HEAD.
|
||||
# After updating, please re-set the CVS tag to HEAD.
|
||||
DISTNAME= pkglint-4.111
|
||||
DISTNAME= pkglint-4.112
|
||||
CATEGORIES= pkgtools
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#! @PERL@
|
||||
# $NetBSD: pkglint.pl,v 1.834 2012/07/09 17:37:30 wiz Exp $
|
||||
# $NetBSD: pkglint.pl,v 1.835 2012/07/09 18:14:35 wiz Exp $
|
||||
#
|
||||
|
||||
# pkglint - static analyzer and checker for pkgsrc packages
|
||||
|
@ -1330,9 +1330,9 @@ my (@options) = (
|
|||
# Commonly used regular expressions.
|
||||
#
|
||||
|
||||
use constant regex_dependency_gt => qr"^((?:\$\{[\w_]+\}|[\w_]|-[^\d])+)>=(.*)$";
|
||||
use constant regex_dependency_gt => qr"^((?:\$\{[\w_]+\}|[\w_\.]|-[^\d])+)>=(\d[^-]*)$";
|
||||
use constant regex_dependency_wildcard
|
||||
=> qr"^((?:\$\{[\w_]+\}|[\w_]|-[^\d\[])+)-(?:\[0-9\]|\d.*)$";
|
||||
=> qr"^((?:\$\{[\w_]+\}|[\w_\.]|-[^\d\[])+)-(?:\[0-9\]|\d[^-]*)$";
|
||||
use constant regex_gnu_configure_volatile_vars
|
||||
=> qr"^(?:.*_)?(?:CFLAGS||CPPFLAGS|CXXFLAGS|FFLAGS|LDFLAGS|LIBS)$";
|
||||
use constant regex_mk_comment => qr"^ *\s*#(.*)$";
|
||||
|
@ -4983,8 +4983,8 @@ sub checkline_mk_vartype_basic($$$$$$$$) {
|
|||
} elsif ($type eq "DependencyWithPath") {
|
||||
if ($value =~ regex_unresolved) {
|
||||
# don't even try to check anything
|
||||
} elsif ($value =~ m":(\.\./\.\./([^/]+)/([^/]+))$") {
|
||||
my ($relpath, $cat, $pkg) = ($1, $2, $3);
|
||||
} elsif ($value =~ m"(.*):(\.\./\.\./([^/]+)/([^/]+))$") {
|
||||
my ($pattern, $relpath, $cat, $pkg) = ($1, $2, $3, $4);
|
||||
|
||||
checkline_relative_pkgdir($line, $relpath);
|
||||
|
||||
|
@ -4999,6 +4999,14 @@ sub checkline_mk_vartype_basic($$$$$$$$) {
|
|||
|
||||
}
|
||||
|
||||
if ($pattern =~ regex_dependency_gt) {
|
||||
# ($abi_pkg, $abi_version) = ($1, $2);
|
||||
} elsif ($pattern =~ regex_dependency_wildcard) {
|
||||
# ($abi_pkg) = ($1);
|
||||
} else {
|
||||
$line->log_warning("Unknown dependency pattern \"${pattern}\".");
|
||||
}
|
||||
|
||||
} elsif ($value =~ m":\.\./[^/]+$") {
|
||||
$line->log_warning("Dependencies should have the form \"../../category/package\".");
|
||||
$line->explain_warning(expl_relative_dirs);
|
||||
|
|
Loading…
Reference in a new issue