]> git.lyx.org Git - features.git/commitdiff
Fix bug #8477
authorEnrico Forestieri <forenr@lyx.org>
Tue, 1 Jan 2013 19:15:57 +0000 (20:15 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Tue, 1 Jan 2013 19:15:57 +0000 (20:15 +0100)
Don't delay the output until the end of the check for the LaTeX packages.

lib/configure.py
status.20x

index f02a5ecc627b3d2c2696fef290d85cd7a0866465..cad150282ece634ae92f56217c53258e02216e70 100644 (file)
@@ -56,9 +56,12 @@ def removeFiles(filenames):
             pass
 
 
-def cmdOutput(cmd):
+def cmdOutput(cmd, async = False):
     '''utility function: run a command and get its output as a string
         cmd: command to run
+        async: if False, return whole output as a string, otherwise
+               return the stdout handle from which the output can be
+               read (the caller is then responsible for closing it)
     '''
     if os.name == 'nt':
         b = False
@@ -68,6 +71,8 @@ def cmdOutput(cmd):
     pipe = subprocess.Popen(cmd, shell=b, close_fds=b, stdin=subprocess.PIPE, \
                             stdout=subprocess.PIPE, universal_newlines=True)
     pipe.stdin.close()
+    if async:
+        return pipe.stdout
     output = pipe.stdout.read()
     pipe.stdout.close()
     return output.strip()
@@ -1197,14 +1202,15 @@ def checkLatexConfig(check_config, bool_docbook):
     cl.close()
     #
     # we have chklayouts.tex, then process it
-    ret = 1
-    latex_out = cmdOutput(LATEX + ' wrap_chkconfig.ltx')
-    for line in latex_out.splitlines():
+    latex_out = cmdOutput(LATEX + ' wrap_chkconfig.ltx', True)
+    while True:
+        line = latex_out.readline()
+        if not line:
+            break;
         if re.match('^\+', line):
             logger.info(line.strip())
-            # return None if the command succeeds
-            if line == "+Inspection done.":
-                ret = None
+    # if the command succeeds, None will be returned
+    ret = latex_out.close()
     #
     # remove the copied file
     if rmcopy:
index c52a15f035f3ad530952aeecc431e1766a71e4d6..d612849bfd1e357e8ba4e521a9d2fc477b222024 100644 (file)
@@ -105,6 +105,9 @@ What's new
 
 - Fix a few selection bugs in tabular (bugs 4981, 7988).
 
+- Show the output of configure.py while the LaTeX packages are being checked
+  rather than all at once at the end of the check (bug 8477).
+
 
 * DOCUMENTATION AND LOCALIZATION