pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Changed the default value of $p...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2fba6f83d417
branches: trunk
changeset: 497108:2fba6f83d417
user: rillig <rillig%pkgsrc.org@localhost>
date: Wed Jul 20 16:56:24 2005 +0000
description:
Changed the default value of $pkgname from "" to undefined.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (65 lines):
diff -r d701f7cf7de9 -r 2fba6f83d417 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Wed Jul 20 16:52:28 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Wed Jul 20 16:56:24 2005 +0000
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.205 2005/07/20 16:52:28 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.206 2005/07/20 16:56:24 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -386,7 +386,7 @@
%seen_Makefile_include = ();
$seen_Makefile_common = false;
%predefined_sites = ();
- $pkgname = "";
+ $pkgname = undef;
%make_vars_typemap = ();
}
@@ -1565,7 +1565,7 @@
$extractsufx = '.tar.gz';
}
- if ($pkgname ne '' && $pkgname eq $distname) {
+ if (defined($pkgname) && $pkgname eq $distname) {
$opt_warn_vague && log_warning(NO_FILE, NO_LINE_NUMBER, "PKGNAME is \${DISTNAME} by default, ".
"you don't need to define PKGNAME.");
}
@@ -1575,7 +1575,7 @@
"than 5 characters.");
}
}
- my $i = ($pkgname eq '') ? $distname : $pkgname;
+ my $i = defined($pkgname) ? $pkgname : $distname;
$i =~ s/\${DISTNAME[^}]*}/$distname/g;
if ($i =~ /-([^-]+)$/) {
my ($j, $k) = ($`, $1);
@@ -1590,14 +1590,14 @@
"looks fine.");
} else {
$opt_warn_vague && log_error(NO_FILE, NO_LINE_NUMBER, "Version number part of PKGNAME".
- (($pkgname eq '')
+ (!defined($pkgname)
? ', which is derived from DISTNAME, '
: ' ').
"looks illegal. You should modify \"-$k\".");
}
} else {
$opt_warn_vague && log_error(NO_FILE, NO_LINE_NUMBER, "PKGNAME".
- (($pkgname eq '')
+ (!defined($pkgname)
? ', which is derived from DISTNAME, '
: ' ').
"must come with version number, like \"foobaa-1.0\".");
@@ -1632,7 +1632,7 @@
}
# make an advice only in certain cases.
- if ($pkgname ne '' && $distfiles =~ /^$pkgname([-\.].+)$/) {
+ if (defined($pkgname) && $distfiles =~ /^$pkgname([-\.].+)$/) {
$opt_warn_vague && log_warning(NO_FILE, NO_LINE_NUMBER, "How about \"DISTNAME=$pkgname\"".
(($1 eq '.tar.gz')
? ""
Home |
Main Index |
Thread Index |
Old Index