diff options
author | wiz <wiz> | 2012-07-09 18:14:35 +0000 |
---|---|---|
committer | wiz <wiz> | 2012-07-09 18:14:35 +0000 |
commit | 8a023f780122ec4726e5cf22f5104babf96384c8 (patch) | |
tree | 19b655949989361175a88a20244cca9350868aa0 /pkgtools/pkglint | |
parent | 0c5ed059520633b082dd0f2ffdcce39e59ad35bb (diff) | |
download | pkgsrc-8a023f780122ec4726e5cf22f5104babf96384c8.tar.gz |
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.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 18 |
2 files changed, 15 insertions, 7 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 68be6322a50..c58cea4e436 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -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 diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 80a9828de27..c2dacd1a047 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -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); |