[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.11-119-ge291ee4



The following commit has been merged in the master branch:
commit e291ee464ec15a45b2c5f28d65b12c20a966601f
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Jan 27 17:44:45 2013 +0100

    lintian: Error out early if a check cannot be loaded
    
    Previously Lintian would attempt to (re)load the check once per
    package to be processed by said check.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index e4aff39..d45f93e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -133,6 +133,7 @@ lintian (2.5.12) UNRELEASED; urgency=low
       Lintian::Lab supports it.
     + [NT] Add new command line option "--[no-]user-dirs" to disable
       loading from $HOME/.lintian{rc,/} and /etc/lintian{rc,/}.
+    + [NT] Error out early if a check cannot be loaded.
 
   * lib/Lintian/Collect.pm:
     + [NT] Add "is_non_free" method to easily check of a given
diff --git a/frontend/lintian b/frontend/lintian
index d2a8635..7a456fe 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1112,6 +1112,21 @@ debug_msg(1,
 my $unpacker = Lintian::Unpacker->new ($collmap, \%unpack_options);
 my %overrides;
 
+if ($action eq 'check') {
+    # Ensure all checks can actually be loaded...
+    foreach my $script (@scripts) {
+        my $cs = $PROFILE->get_script ($script);
+        eval {
+            $cs->load_check;
+        };
+        if ($@) {
+            warning ("Cannot load check \"$script\"");
+            print STDERR $@;
+            exit 2;
+        }
+    }
+}
+
 foreach my $gname (sort $pool->get_group_names()) {
     my $group = $pool->get_group($gname);
     unpack_group ($gname, $group);
@@ -1350,7 +1365,7 @@ sub process_group {
             # The lintian check is done by this frontend and we
             # also skip the check if it is not for this type of
             # package.
-            next if (!$cs->is_check_type ($pkg_type) || $check eq 'lintian');
+            next if !$cs->is_check_type ($pkg_type);
 
             debug_msg(1, "Running check: $check ...");
             eval {

-- 
Debian package checker


Reply to: