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

[lintian] 01/02: lintian: Correct the time used in the status fd



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 61c0255935b206e9acaff323950f305acd6057e5
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Feb 10 21:59:43 2015 +0100

    lintian: Correct the time used in the status fd
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 frontend/lintian | 39 +++++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/frontend/lintian b/frontend/lintian
index 22d164f..0abea5f 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1291,28 +1291,31 @@ if ($action eq 'check') {
 foreach my $gname (sort $pool->get_group_names()) {
     my $success = 1;
     my $group = $pool->get_group($gname);
-    my $raw_res = timed_task {
-        if (!unpack_group($gname, $group)) {
-            $success = 0;
+    my $total_raw_res = timed_task {
+        my $raw_res = timed_task {
+            if (!unpack_group($gname, $group)) {
+                $success = 0;
+            }
+        };
+        my $tres = $format_timer_result->($raw_res);
+        debug_msg(1, "Unpack of $gname done$tres");
+        perf_log("$gname,total-group-unpack,${raw_res}");
+        if ($action eq 'check') {
+            if (!process_group($gname, $group)) {
+                $success = 0;
+            }
+            $group->clear_cache;
+            # Double check that no processes are running;  hopefully
+            # it will catch regressions like 3bbcc3b earlier.
+            fail('Unreaped processes after running checks!?')
+              if waitpid(-1, WNOHANG) != -1;
         }
     };
-    my $tres = $format_timer_result->($raw_res);
-    debug_msg(1, "Unpack of $gname done$tres");
-    perf_log("$gname,total-group-unpack,${raw_res}");
-    if ($action eq 'check') {
-        if (!process_group($gname, $group)) {
-            $success = 0;
-        }
-        $group->clear_cache;
-        # Double check that no processes are running;  hopefully
-        # it will catch regressions like 3bbcc3b earlier.
-        fail('Unreaped processes after running checks!?')
-          if waitpid(-1, WNOHANG) != -1;
-    }
+    my $total_tres = $format_timer_result->($total_raw_res);
     if ($success) {
-        print {$STATUS_FD} "complete ${gname}${tres}\n";
+        print {$STATUS_FD} "complete ${gname}${$total_tres}\n";
     } else {
-        print {$STATUS_FD} "error ${gname}${tres}\n";
+        print {$STATUS_FD} "error ${gname}${$total_tres}\n";
     }
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: