diff options
author | rillig <rillig@pkgsrc.org> | 2008-11-18 19:39:49 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2008-11-18 19:39:49 +0000 |
commit | a3a3f7f7756baeac0caad354ff26aa493814f669 (patch) | |
tree | 3ee81c6ccff3fd9d1792c7f96ae4a12bfcf64777 | |
parent | f8e31546d43c0ba0aec908c482b2c8f16d36ceb3 (diff) | |
download | pkgsrc-a3a3f7f7756baeac0caad354ff26aa493814f669.tar.gz |
Get rid of the false positive warnings for downgrading, by doing more
magic to the PKGNAME and DISTNAME in the package Makefile. Thanks, wiz,
for insisting on this.
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 918d6795013..1e0eada4da6 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.786 2008/11/18 19:18:51 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.787 2008/11/18 19:39:49 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -6890,6 +6890,13 @@ sub checkfile_package_Makefile($$) { # name more often. if (defined($distname) && defined($pkgname)) { $pkgname =~ s/\$\{DISTNAME\}/$distname/; + + if ($pkgname =~ m"^(.*)\$\{DISTNAME:S(.)([^:]*)\2([^:]*)\2\}(.*)$") { + my ($before, $separator, $old, $new, $after) = ($1, $2, $3, $4, $5); + my $newname = $distname; + $newname =~ s/$old/$new/; + $pkgname = $before . $newname . $after; + } } if (defined($pkgname) && defined($distname) && $pkgname eq $distname) { |