bin/update/create_build_config.py |    2 +-
 bin/update/uncompress_mar.py      |   11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit f79258444185f3d6939facb3cab071ad92d873e4
Author: Markus Mohrhard <markus.mohrh...@googlemail.com>
Date:   Sun Aug 6 22:48:39 2017 +0200

    updater: fix small python issue
    
    Change-Id: I0834a088af1527e4ed0d181f9e3a63ee82d0e980

diff --git a/bin/update/create_build_config.py 
b/bin/update/create_build_config.py
index 80e8fbab8156..7cc8ac4be15e 100755
--- a/bin/update/create_build_config.py
+++ b/bin/update/create_build_config.py
@@ -41,7 +41,7 @@ def main(argv):
 
     extra_data_files = ['complete_info.json', 'partial_update_info.json']
     if sys.platform != "cygwin":
-        extra_data_files += 'complete_lang_info.json'
+        extra_data_files.append('complete_lang_info.json')
 
     for extra_file in extra_data_files:
         extra_file_path = os.path.join(argv[5], extra_file)
commit 1a4351a6a142389071ba3ad8400c14894fa6e4d4
Author: Markus Mohrhard <markus.mohrh...@googlemail.com>
Date:   Sat Aug 5 05:52:46 2017 +0200

    updater: handle paths with spaces correctly
    
    Change-Id: I8089f1e2b46a242562608431e56c5da4c63fdb01

diff --git a/bin/update/uncompress_mar.py b/bin/update/uncompress_mar.py
index cecb16af0e6c..0989c7e92d6d 100755
--- a/bin/update/uncompress_mar.py
+++ b/bin/update/uncompress_mar.py
@@ -11,6 +11,7 @@
 # Extract a mar file and uncompress the content
 
 import os
+import re
 import sys
 import subprocess
 from path import convert_to_native
@@ -26,13 +27,17 @@ def extract_mar(mar_file, target_dir):
     subprocess.check_call([mar, "-C", convert_to_native(target_dir), "-x", 
convert_to_native(mar_file)])
     file_info = subprocess.check_output([mar, "-t", 
convert_to_native(mar_file)])
     lines = file_info.splitlines()
+    prog = re.compile("\d+\s+\d+\s+(.+)")
     for line in lines:
-        info = line.split()
+        match = prog.match(line.decode("utf-8", "strict"))
+        if match is None:
+            continue
+        info = match.groups()[0]
         # ignore header line
-        if info[2] == b'NAME':
+        if info == b'NAME':
             continue
 
-        uncompress_content(os.path.join(target_dir, info[2].decode("utf-8")))
+        uncompress_content(os.path.join(target_dir, info))
 
 def main():
     if len(sys.argv) != 3:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to