[SCM] Debian package checker branch, master, updated. 2.2.2-24-g0beb00a
The following commit has been merged in the master branch:
commit d4d1a687df2c33acfe79d567df9c477d9c31860f
Author: Russ Allbery <rra@debian.org>
Date: Sat Feb 7 17:03:57 2009 -0800
Avoid circular compile-time Lintian::Collect dependencies
* lib/Lintian/Collect.pm:
+ [RA] Defer loading of the subclasses until the constructor to avoid
circular dependencies at compilation time.
diff --git a/debian/changelog b/debian/changelog
index f6700fa..a95a7d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -53,6 +53,9 @@ lintian (2.2.3) UNRELEASED; urgency=low
+ [RA] Add pedantic check for maintainer scripts using #!/bin/sh -e
instead of set -e in the script body. (Closes: #119045)
+ * lib/Lintian/Collect.pm:
+ + [RA] Defer loading of the subclasses until the constructor to avoid
+ circular dependencies at compilation time.
* lib/Lintian/Relation.pm:
+ [RA] New class based on the existing Dep module that handles package
relationship analysis. Now includes documentation, uses a more
diff --git a/lib/Lintian/Collect.pm b/lib/Lintian/Collect.pm
index 119b048..00b5159 100644
--- a/lib/Lintian/Collect.pm
+++ b/lib/Lintian/Collect.pm
@@ -19,9 +19,6 @@
package Lintian::Collect;
use strict;
-use Lintian::Collect::Binary;
-use Lintian::Collect::Source;
-
# Take the package name and type, initialize an appropriate collect object
# based on the package type, and return it. Returns undef for an unknown
# package type.
@@ -29,8 +26,10 @@ sub new {
my ($class, $pkg, $type) = @_;
my $object;
if ($type eq 'source') {
+ require Lintian::Collect::Source;
$object = Lintian::Collect::Source->new ($pkg);
} elsif ($type eq 'binary' or $type eq 'udeb') {
+ require Lintian::Collect::Binary;
$object = Lintian::Collect::Binary->new ($pkg);
} else {
return;
--
Debian package checker
Reply to: