diff options
author | rillig <rillig> | 2008-11-19 07:46:35 +0000 |
---|---|---|
committer | rillig <rillig> | 2008-11-19 07:46:35 +0000 |
commit | 97ec95403d597278813f1d172d8b421610e2450f (patch) | |
tree | 2937b74b80931b34212f4ef497f42265d6ed0923 /pkgtools/pkglint/files/pkglint.pl | |
parent | a289b002aa9f3ad930a9b286e55ae2d7ea330eb9 (diff) | |
download | pkgsrc-97ec95403d597278813f1d172d8b421610e2450f.tar.gz |
Fixed the (hopefully) last issue with the downgrading warning.
Diffstat (limited to 'pkgtools/pkglint/files/pkglint.pl')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index f01907d0b92..3dd89950b7b 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.788 2008/11/18 21:17:53 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.789 2008/11/19 07:46:35 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -6891,13 +6891,17 @@ sub checkfile_package_Makefile($$) { if (defined($distname) && defined($pkgname)) { $pkgname =~ s/\$\{DISTNAME\}/$distname/; - if ($pkgname =~ m"^(.*)\$\{DISTNAME:S(.)([^:]*)\2([^:]*)\2g?\}(.*)$") { - my ($before, $separator, $old, $new, $after) = ($1, $2, $3, $4, $5); + if ($pkgname =~ m"^(.*)\$\{DISTNAME:S(.)([^:]*)\2([^:]*)\2(g?)\}(.*)$") { + my ($before, $separator, $old, $new, $mod, $after) = ($1, $2, $3, $4, $5, $6); my $newname = $distname; $old = quotemeta($old); $old =~ s/^\\\^/^/; $old =~ s/\\\$$/\$/; - $newname =~ s/$old/$new/; + if ($mod eq "g") { + $newname =~ s/$old/$new/g; + } else { + $newname =~ s/$old/$new/; + } $opt_debug_misc and $pkgname_line->log_debug("old pkgname=$pkgname"); $pkgname = $before . $newname . $after; $opt_debug_misc and $pkgname_line->log_debug("new pkgname=$pkgname"); |