Thu Nov 6 14:46:51 2008 UTC ()
Only check doc/CHANGES-* starting with 2008, as suggested by OBATA Akio
on pkgsrc-changes.

TODO: Discuss whether the old files should be converted to the common
format or just be left as they are.


(rillig)
diff -r1.782 -r1.783 pkgsrc/pkgtools/pkglint/files/pkglint.pl

cvs diff -r1.782 -r1.783 pkgsrc/pkgtools/pkglint/files/Attic/pkglint.pl (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkglint/files/Attic/pkglint.pl 2008/11/04 23:13:05 1.782
+++ pkgsrc/pkgtools/pkglint/files/Attic/pkglint.pl 2008/11/06 14:46:51 1.783
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1#! @PERL@ 1#! @PERL@
2# $NetBSD: pkglint.pl,v 1.782 2008/11/04 23:13:05 rillig Exp $ 2# $NetBSD: pkglint.pl,v 1.783 2008/11/06 14:46:51 rillig Exp $
3# 3#
4 4
5# pkglint - static analyzer and checker for pkgsrc packages 5# pkglint - static analyzer and checker for pkgsrc packages
6# 6#
7# Written by: 7# Written by:
8# Roland Illig <rillig@NetBSD.org> 8# Roland Illig <rillig@NetBSD.org>
9# 9#
10# Based on work by: 10# Based on work by:
11# Hubert Feyrer <hubertf@NetBSD.org> 11# Hubert Feyrer <hubertf@NetBSD.org>
12# Thorsten Frueauf <frueauf@NetBSD.org> 12# Thorsten Frueauf <frueauf@NetBSD.org>
13# Thomas Klausner <wiz@NetBSD.org> 13# Thomas Klausner <wiz@NetBSD.org>
14# and others. 14# and others.
15# 15#
@@ -2224,27 +2224,27 @@ sub get_wip_TODO_updates() { @@ -2224,27 +2224,27 @@ sub get_wip_TODO_updates() {
2224my $get_doc_CHANGES_docs = undef; # [ $fname, undef or $lines ] 2224my $get_doc_CHANGES_docs = undef; # [ $fname, undef or $lines ]
2225sub get_doc_CHANGES($) { 2225sub get_doc_CHANGES($) {
2226 my ($pkgpath) = @_; 2226 my ($pkgpath) = @_;
2227 2227
2228 $opt_debug_trace and log_debug(NO_FILE, NO_LINES, "get_doc_CHANGES(\"$pkgpath\")"); 2228 $opt_debug_trace and log_debug(NO_FILE, NO_LINES, "get_doc_CHANGES(\"$pkgpath\")");
2229 2229
2230 # Make a reversed list of all the CHANGES-* files, but don't load 2230 # Make a reversed list of all the CHANGES-* files, but don't load
2231 # them yet. 2231 # them yet.
2232 if (!defined($get_doc_CHANGES_docs)) { 2232 if (!defined($get_doc_CHANGES_docs)) {
2233 opendir(DIR, "${cwd_pkgsrcdir}/doc") or die; 2233 opendir(DIR, "${cwd_pkgsrcdir}/doc") or die;
2234 my @files = readdir(DIR); 2234 my @files = readdir(DIR);
2235 closedir(DIR) or die; 2235 closedir(DIR) or die;
2236 foreach my $file (reverse sort @files) { 2236 foreach my $file (reverse sort @files) {
2237 if ($file =~ m"^CHANGES-\d+$") { 2237 if ($file =~ m"^CHANGES-(\d+)$" && (0 + $1 >= 2008)) {
2238 push(@$get_doc_CHANGES_docs, [ $file, undef ]); 2238 push(@$get_doc_CHANGES_docs, [ $file, undef ]);
2239 } 2239 }
2240 } 2240 }
2241 $opt_debug_misc and log_debug(NO_FILE, NO_LINES, "Found " . (scalar @$get_doc_CHANGES_docs) . " changes files."); 2241 $opt_debug_misc and log_debug(NO_FILE, NO_LINES, "Found " . (scalar @$get_doc_CHANGES_docs) . " changes files.");
2242 } 2242 }
2243 2243
2244 # Scan the *-CHANGES files in reverse order until some action 2244 # Scan the *-CHANGES files in reverse order until some action
2245 # matches the package directory. 2245 # matches the package directory.
2246 my @result = (); 2246 my @result = ();
2247 foreach my $doc (@$get_doc_CHANGES_docs) { 2247 foreach my $doc (@$get_doc_CHANGES_docs) {
2248 if (!defined($doc->[1])) { 2248 if (!defined($doc->[1])) {
2249 $opt_debug_misc and log_debug(NO_FILE, NO_LINES, "loading $doc->[0]"); 2249 $opt_debug_misc and log_debug(NO_FILE, NO_LINES, "loading $doc->[0]");
2250 my $lines = load_file("${cwd_pkgsrcdir}/doc/$doc->[0]") or die; 2250 my $lines = load_file("${cwd_pkgsrcdir}/doc/$doc->[0]") or die;