pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Pkglint can now resolve a plain...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2273d6b63e20
branches: trunk
changeset: 516931:2273d6b63e20
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue Aug 01 08:58:49 2006 +0000
description:
Pkglint can now resolve a plain occurrence of ${DISTNAME} in PKGNAME,
which helps for some Perl modules to get the correct package name, which
in turn influences whether the update requests from doc/TODO can be
shown or not.
Suggested by wiz.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r 458a0a40a807 -r 2273d6b63e20 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue Aug 01 08:25:45 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue Aug 01 08:58:49 2006 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.667 2006/07/29 10:56:03 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.668 2006/08/01 08:58:49 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -6471,6 +6471,12 @@
my $distname = defined($distname_line) ? $distname_line->get("value") : undef;
my $pkgname = defined($pkgname_line) ? $pkgname_line->get("value") : undef;
+ # Let's do some tricks to get the proper value of the package
+ # name more often.
+ if (defined($distname) && defined($pkgname)) {
+ $pkgname =~ s/\$\{DISTNAME\}/$distname/;
+ }
+
if (defined($pkgname) && defined($distname) && ($pkgname eq $distname || $pkgname eq "\${DISTNAME}")) {
$pkgname_line->log_note("PKGNAME is \${DISTNAME} by default. You don't need to define PKGNAME.");
}
Home |
Main Index |
Thread Index |
Old Index