summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-01-09 02:47:56 +0000
committerrillig <rillig@pkgsrc.org>2006-01-09 02:47:56 +0000
commit043613d2775c11df7151b445e9a36644f71d6c04 (patch)
tree88f07c2c2f7310673a748aa5f666ad79d53b5a06 /pkgtools
parenta1f80b8a53d965f46f0ffd9ac83caea6a9093e66 (diff)
downloadpkgsrc-043613d2775c11df7151b445e9a36644f71d6c04.tar.gz
- Added "Please use ${FOO} instead of $(FOO)."
- It is an error if the COMMENT has the default value from url2pkg.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 6605ec2a2e1..d55ab815207 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@ -w
-# $NetBSD: pkglint.pl,v 1.457 2006/01/08 15:55:13 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.458 2006/01/09 02:47:56 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1690,6 +1690,13 @@ sub checkline_mk_text($$) {
}
}
+ $rest = $text;
+ while ($rest =~ s/\$\(([-A-Z0-9a-z_]+)(?::[^\}]+)?\)//) {
+ my ($varname) = ($1);
+
+ $line->log_warning("Please use \${${varname}\} instead of \$(${varname}).");
+ }
+
}
sub checkline_mk_shellword($$$) {
@@ -2057,6 +2064,9 @@ sub checkline_mk_vartype_basic($$$$$) {
}
} elsif ($type eq "Comment") {
+ if ($value eq "SHORT_DESCRIPTION_OF_THE_PACKAGE") {
+ $line->log_error("COMMENT must be set.");
+ }
if ($value =~ qr"^(a|an)\s+"i) {
$line->log_warning("COMMENT should not begin with '$1'.");
}
@@ -3004,8 +3014,6 @@ sub checkfile_package_Makefile($$$) {
checkperms($fname);
- # TODO: "Please use \${VARIABLE} instead of \$(VARIABLE)."
-
if (!exists($makevar->{"PLIST_SRC"})
&& !exists($makevar->{"NO_PKG_REGISTER"})
&& !-f "${current_dir}/$pkgdir/PLIST"