summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-10-30 22:27:07 +0000
committerrillig <rillig@pkgsrc.org>2006-10-30 22:27:07 +0000
commitc57a04cdcf07e5592df390fb1b7ebf2479b29e45 (patch)
tree0287e61f80290e670a356636487393c0dbc18b31 /pkgtools
parentec3e83f6d3573a0674c9a6beb7a5b15068082f04 (diff)
downloadpkgsrc-c57a04cdcf07e5592df390fb1b7ebf2479b29e45.tar.gz
Added a warning that ${VARIABLES} in the DESCR file are not expanded.
(Requested in PR 34920.) The warning about uncommitted patch files only appears when the distinfo file is already committed.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index e2e691eff57..616dbf7a49b 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.683 2006/10/24 07:18:41 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.684 2006/10/30 22:27:07 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -6291,6 +6291,9 @@ sub checkfile_DESCR($) {
checkline_trailing_whitespace($line);
checkline_valid_characters($line, regex_validchars);
checkline_spellcheck($line);
+ if ($line->text =~ qr"\$\{") {
+ $line->log_warning("Variables are not expanded in the DESCR file.");
+ }
}
checklines_trailing_empty_lines($lines);
@@ -6309,6 +6312,7 @@ sub checkfile_DESCR($) {
sub checkfile_distinfo($) {
my ($fname) = @_;
my ($lines, %in_distinfo, $current_fname, $state, $patches_dir);
+ my ($di_is_committed);
use constant DIS_start => 0;
use constant DIS_SHA1 => 0; # same as DIS_start
@@ -6317,6 +6321,8 @@ sub checkfile_distinfo($) {
$opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_distinfo()");
+ $di_is_committed = is_committed($fname);
+
checkperms($fname);
if (!($lines = load_file($fname))) {
log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
@@ -6417,7 +6423,7 @@ sub checkfile_distinfo($) {
if ($is_patch && defined($patches_dir)) {
my $fname = "${current_dir}/${patches_dir}/${chksum_fname}";
- if (!is_committed($fname)) {
+ if ($di_is_committed && !is_committed($fname)) {
$line->log_warning("${patches_dir}/${chksum_fname} is registered in distinfo but not added to CVS.");
}