diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-03-26 17:09:07 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-03-26 18:28:21 +0100 |
commit | c76fdcf1cfa1242e66b50ebe80d6eac1baae37a9 (patch) | |
tree | de0c7380e9750302499a584dec93d09358ebe383 /external/nss | |
parent | e0fd3300514e020758930f4fe30652424d0efe2e (diff) |
try to fix UnicodeDecodeError with gyp when building nss
https://ci.libreoffice.org/job/gerrit_windows/60353/consoleFull
fails for some reason when gyp tries to read the variables set up
by the MSVC .bat file that sets up environment for cl.exe .
Presumably there is some env. variable that has incorrect content
for cp1252 encoding. Try to simply ignore such errors and make
Python replace the character with something.
Change-Id: Id5fca688fdd533fad2789a391928777b5065ec20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91149
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'external/nss')
-rw-r--r-- | external/nss/gyp-buildsystem.patch.0 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/external/nss/gyp-buildsystem.patch.0 b/external/nss/gyp-buildsystem.patch.0 index 8323d1a7a7c3..56502ab874f3 100644 --- a/external/nss/gyp-buildsystem.patch.0 +++ b/external/nss/gyp-buildsystem.patch.0 @@ -5,7 +5,7 @@ # Setup params to pass to and attempt to launch reg.exe. cmd = ['reg.exe', 'query', r'HKLM\Software\Microsoft\DirectX', '/s'] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,universal_newlines=True) ++ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,universal_newlines=True,errors='replace') for line in p.communicate()[0].splitlines(): if 'InstallPath' in line: dxsdk_dir = line.split(' ')[3] + "\\" @@ -32,7 +32,7 @@ args.extend(('&&', 'set')) popen = subprocess.Popen( - args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) -+ args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) ++ args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True,errors='replace') variables, _ = popen.communicate() if popen.returncode != 0: raise Exception('"%s" failed with error %d' % (args, popen.returncode)) @@ -41,7 +41,7 @@ args.extend(('&&', 'for', '%i', 'in', '(cl.exe)', 'do', '@echo', 'LOC:%~$PATH:i')) - popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE) -+ popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE,universal_newlines=True) ++ popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE,universal_newlines=True,errors='replace') output, _ = popen.communicate() cl_paths[arch] = _ExtractCLPath(output) return cl_paths @@ -66,7 +66,7 @@ # non-Windows don't do that there. link = subprocess.Popen(args, shell=sys.platform == 'win32', env=env, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) -+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True,errors='replace') out, _ = link.communicate() for line in out.splitlines(): if (not line.startswith(' Creating library ') and @@ -86,7 +86,7 @@ env = self._GetEnv(arch) popen = subprocess.Popen(args, shell=True, env=env, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) -+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True,errors='replace') out, _ = popen.communicate() for line in out.splitlines(): if line and 'manifest authoring warning 81010002' not in line: @@ -95,7 +95,7 @@ env = self._GetEnv(arch) popen = subprocess.Popen(args, shell=True, env=env, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) -+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True,errors='replace') out, _ = popen.communicate() # Filter junk out of stdout, and write filtered versions. Output we want # to filter is pairs of lines that look like this: @@ -104,7 +104,7 @@ env = self._GetEnv(arch) popen = subprocess.Popen(args, shell=True, env=env, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) -+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True,errors='replace') out, _ = popen.communicate() for line in out.splitlines(): if (not line.startswith('Copyright (C) Microsoft Corporation') and @@ -113,7 +113,7 @@ env = self._GetEnv(arch) popen = subprocess.Popen(args, shell=True, env=env, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) -+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True,errors='replace') out, _ = popen.communicate() for line in out.splitlines(): if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and |