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 | 8e0ecf36c026d7e8fa3ecc67bacf150fa8a0304c (patch) | |
tree | 3ee81c6ccff3fd9d1792c7f96ae4a12bfcf64777 /pkgtools | |
parent | d470f699444de7a37d633b12bac34fa94c5c037a (diff) | |
download | pkgsrc-8e0ecf36c026d7e8fa3ecc67bacf150fa8a0304c.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.
Diffstat (limited to 'pkgtools')
-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) { |