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

[SCM] Debian package checker branch, lab-refactor, updated. 2.5.3-190-g2e55f6b



The following commit has been merged in the lab-refactor branch:
commit e543cea5f8f5b8884cd69d30fb488fea7d8bdf2d
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Nov 2 11:48:31 2011 +0100

    harness: Fixed incremental run and lazily run lintian
    
    The incremental run accidentally added the "-a" flag to the lintian
    cmd line.  Furthermore, if there are no new or added packages, then
    the lintian run is now skipped.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/reporting/harness b/reporting/harness
index a26c0da..8e291fd 100755
--- a/reporting/harness
+++ b/reporting/harness
@@ -128,7 +128,7 @@ unless ($opt_r) {
     my @inc;
     # Use the FullEWI output as it is less ambiguous for html_reports - it shouldn't make a difference
     # but still...
-    my $cmd ="$lintian_cmd -I -E --pedantic -v -a --show-overrides -U changelog-file".
+    my $cmd ="$lintian_cmd -I -E --pedantic -v --show-overrides -U changelog-file".
         " --exp-output=format=fullewi";
     # Remove old/stale packages from the lab
     foreach my $diff (@diffs) {
@@ -222,35 +222,43 @@ unless ($opt_r) {
         close $nfd;
         close $ofd;
         Log ('');
-        Log ('Creating work list for lintian');
-        open my $lfd, '>', $list_file
-            or Die ("opening $list_file: $!");
-        foreach my $query (@inc) {
-            print $lfd "$query\n";
+        if (@inc) {
+            Log ('Creating work list for lintian');
+            open my $lfd, '>', $list_file
+                or Die ("opening $list_file: $!");
+            foreach my $query (@inc) {
+                Log (" - TODO - !query: $query\n");
+                print $lfd "!query: $query\n";
+            }
+            close $lfd;
+            Log ('');
+
+            # incremental run cmd changes
+            Log ('Running Lintian over newly introduced and changed packages...');
+            $cmd .= " --packages-from-file $list_file >>$lintian_log 2>&1";
+        } else {
+            $cmd = undef;
+            Log ('Skipping Lintian run - nothing to do...');
         }
-        close $lfd;
-        Log ('');
-
-        # incremental run cmd changes
-        Log('Running Lintian over newly introduced and changed packages...');
-        $cmd .= " --packages-from-file $list_file >>$lintian_log 2>&1";
     } else {
         # full run cmd changes
         Log('Running Lintian over all packages...');
-        $cmd .= " >$lintian_log 2>&1";
+        $cmd .= " -a >$lintian_log 2>&1";
     }
 
-    Log("Executing $cmd");
-    my $res = (system($cmd) >> 8);
-    (($res == 0) or ($res == 1))
-        or Log("warning: executing lintian returned $res");
-    Log('');
+    if ($cmd) {
+        Log("Executing $cmd");
+        my $res = (system($cmd) >> 8);
+        (($res == 0) or ($res == 1))
+            or Log("warning: executing lintian returned $res");
+        Log('');
+    }
 }
 
 # create html reports
 Log('Creating HTML reports...');
 run("$html_reports_cmd $lintian_log >$html_reports_log 2>&1")
-    or Log("warning: executing $html_reports_cmd returned $?");
+    or Log("warning: executing $html_reports_cmd returned " . (($? >> 8) & 0xff));
 Log('');
 
 # rotate the statistics file updated by $html_reports_cmd

-- 
Debian package checker


Reply to: