lintian: r1360 - in trunk: checks debian frontend lib
Author: rra
Date: 2008-06-07 10:01:34 +0200 (Sat, 07 Jun 2008)
New Revision: 1360
Modified:
trunk/checks/cruft
trunk/checks/watch-file
trunk/debian/changelog
trunk/frontend/lintian
trunk/lib/Checker.pm
Log:
* frontend/lintian:
+ [RA] Create a new Lintian::Collect object for each package being
checked and pass it into Checker::runcheck.
* lib/Checker.pm:
+ [RA] Pass a Lintian::Collect object as the third argument to the run
function of each check.
Modified: trunk/checks/cruft
===================================================================
--- trunk/checks/cruft 2008-06-07 07:50:41 UTC (rev 1359)
+++ trunk/checks/cruft 2008-06-07 08:01:34 UTC (rev 1360)
@@ -88,7 +88,7 @@
$pkg = shift;
my $type = shift;
-$collect = Lintian::Collect->new($pkg, $type);
+$collect = shift;
if (-e "debfiles/files" and not -z "debfiles/files") {
tag 'debian-files-list-in-source';
Modified: trunk/checks/watch-file
===================================================================
--- trunk/checks/watch-file 2008-06-07 07:50:41 UTC (rev 1359)
+++ trunk/checks/watch-file 2008-06-07 08:01:34 UTC (rev 1360)
@@ -29,7 +29,7 @@
my $pkg = shift;
my $type = shift;
-my $collect = Lintian::Collect->new($pkg, $type);
+my $collect = shift;
unless ($collect->native) {
unless (-f "debfiles/watch") {
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-06-07 07:50:41 UTC (rev 1359)
+++ trunk/debian/changelog 2008-06-07 08:01:34 UTC (rev 1360)
@@ -87,6 +87,13 @@
+ [RA] Update standards version to 3.8.0.
+ [RA] Depend on libtimedate-perl for convenient date parsing.
+ * frontend/lintian:
+ + [RA] Create a new Lintian::Collect object for each package being
+ checked and pass it into Checker::runcheck.
+
+ * lib/Checker.pm:
+ + [RA] Pass a Lintian::Collect object as the third argument to the run
+ function of each check.
* lib/Lintian/Collect.pm:
+ [RA] New module to retrieve package information.
* lib/Lintian/Collect/Source.pm:
Modified: trunk/frontend/lintian
===================================================================
--- trunk/frontend/lintian 2008-06-07 07:50:41 UTC (rev 1359)
+++ trunk/frontend/lintian 2008-06-07 08:01:34 UTC (rev 1360)
@@ -1185,6 +1185,7 @@
}
require Checker;
+require Lintian::Collect;
# for each package (the `reverse sort' is to make sure that source packages are
# before the corresponding binary packages--this has the advantage that binary
@@ -1356,6 +1357,7 @@
}
# perform checks
+ my $collect = Lintian::Collect->new($pkg, $long_type);
for my $check (keys %checks) {
my $ci = $check_info{$check};
@@ -1379,7 +1381,7 @@
next PACKAGE;
}
- my $returnvalue = Checker::runcheck($pkg, $long_type, $check);
+ my $returnvalue = Checker::runcheck($pkg, $long_type, $collect, $check);
# Set exit_code correctly if there was not yet an exit code
$exit_code = $returnvalue unless $exit_code;
Modified: trunk/lib/Checker.pm
===================================================================
--- trunk/lib/Checker.pm 2008-06-07 07:50:41 UTC (rev 1359)
+++ trunk/lib/Checker.pm 2008-06-07 08:01:34 UTC (rev 1360)
@@ -51,9 +51,7 @@
}
sub runcheck {
- my $pkg = shift;
- my $type = shift;
- my $name = shift;
+ my ($pkg, $type, $collect, $name) = @_;
# Will be set to 2 if error is encountered
my $return = 0;
@@ -67,7 +65,7 @@
#print STDERR "Now running $name...\n";
$name =~ s/[-.]/_/g;
- eval { &{'Lintian::'.$name.'::run'}($pkg, $type) };
+ eval { &{'Lintian::'.$name.'::run'}($pkg, $type, $collect) };
if ( $@ ) {
print STDERR $@;
print STDERR "internal error: cannot run $name check on package $pkg\n";
@@ -79,4 +77,8 @@
1;
+# Local Variables:
+# indent-tabs-mode: t
+# cperl-indent-level: 8
+# End:
# vim: ts=4 sw=4 noet
Reply to: