pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Fixed the (hopefully) last issu...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a8cbc97d196c
branches: trunk
changeset: 550339:a8cbc97d196c
user: rillig <rillig%pkgsrc.org@localhost>
date: Wed Nov 19 07:46:35 2008 +0000
description:
Fixed the (hopefully) last issue with the downgrading warning.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r d9bc8873db04 -r a8cbc97d196c pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Wed Nov 19 03:39:57 2008 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Wed Nov 19 07:46:35 2008 +0000
@@ -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 @@
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");
Home |
Main Index |
Thread Index |
Old Index