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

[SCM] Debian package checker branch, master, updated. 1.24.4-60-g79894a7



The following commit has been merged in the master branch:
commit 79894a77ee2355b658154a2c8b9bde0402f812c1
Author: Russ Allbery <rra@debian.org>
Date:   Mon Aug 25 18:44:43 2008 -0700

    Ensure the lintian-info pipe is closed before exiting
    
    * frontend/lintian:
      + [RA] Ensure we close the pipe to lintian-info before exiting, since
        otherwise lintian-info may print the rest of our output after
        lintian exits, producing confusing output interleaved with the
        shell prompt.  (Closes: #496295)

diff --git a/debian/changelog b/debian/changelog
index 36499d0..0c89b05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,12 @@ lintian (1.25.0) unstable; urgency=low
       very few cases where this would produce false negatives
       but there are reported false positives for the current
       expressions.
+
+  * frontend/lintian:
+    + [RA] Ensure we close the pipe to lintian-info before exiting, since
+      otherwise lintian-info may print the rest of our output after
+      lintian exits, producing confusing output interleaved with the
+      shell prompt.  (Closes: #496295)
   
   * t/runtests:
     + [FL] Copy the changes to testset/runtests from JP's branch.
diff --git a/frontend/lintian b/frontend/lintian
index 7ac7779..bfd3576 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -729,6 +729,18 @@ if ($lintian_info) {
     open(OUTPUT_PIPE, '|-', $lintian_info_cmd) or fail("cannot open output pipe to $lintian_info_cmd: $!");
     select OUTPUT_PIPE;
 }
+
+# Close the OUTPUT_PIPE in an END block so that we can ensure that
+# lintian-info exits before we do.  Otherwise, we may get output from
+# lintian-info after lintian exits, which can confuse the shell output.
+END {
+    if ($lintian_info) {
+        my $status = $?;
+        close OUTPUT_PIPE;
+        select STDOUT;
+        $? = $status;
+    }
+}
 # }}}
 
 # {{{ Compile list of files to process

-- 
Debian package checker


Reply to: