commit ec0a86f6fef22c8abd4f1768bf0a09a471f26016
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Oct 8 11:05:16 2021 +0100
fix patch
chromium-clang-format.patch | 46 +++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 22 deletions(-)
---
diff --git a/chromium-clang-format.patch b/chromium-clang-format.patch
index 77e842e..7a23ed6 100644
--- a/chromium-clang-format.patch
+++ b/chromium-clang-format.patch
@@ -1,34 +1,36 @@
-diff -up chromium-93.0.4577.63/buildtools/linux64/clang-format.clang-format-py3
chromium-93.0.4577.63/buildtools/linux64/clang-format
---- chromium-93.0.4577.63/buildtools/linux64/clang-format.clang-format-py3 2021-09-03
04:42:46.736294345 +0000
-+++ chromium-93.0.4577.63/buildtools/linux64/clang-format 2021-09-03 04:59:55.296512600
+0000
-@@ -10,9 +10,9 @@ import sys
- args = sys.argv[1:]
- inputfiles = [a for a in args if not a.startswith('-')]
+--- a/buildtools/linux64/clang-format
++++ b/buildtools/linux64/clang-format
+@@ -12,9 +12,9 @@ def main():
+ args = sys.argv[1:]
+ inputfiles = [a for a in args if not a.startswith('-')]
--contents = ''
-+contents = b''
- if '-' in args or not inputfiles:
+- contents = ''
++ contents = b''
+ if '-' in args or not inputfiles:
- contents = sys.stdin.read()
+ contents = sys.stdin.buffer.read()
- # Tarball builds may or may not have depot_tools in $PATH. In the former case,
- # running 'clang-format' will call back into this script infinitely. Strip off
-@@ -34,14 +34,14 @@ try:
+ # Tarball builds may or may not have depot_tools in $PATH. In the former case,
+ # running 'clang-format' will call back into this script infinitely. Strip
off
+@@ -37,17 +37,17 @@ def main():
stdout, stderr = proc.communicate(input=contents)
# Ignore if clang-format fails. Eg: it may be too old to support C++14.
if proc.returncode == 0:
-- sys.stdout.write(stdout)
-- sys.stderr.write(stderr)
-+ sys.stdout.buffer.write(stdout)
-+ sys.stderr.buffer.write(stderr)
- sys.exit(0)
- except OSError:
+- sys.stdout.write(stdout)
+- sys.stderr.write(stderr)
++ sys.stdout.buffer.write(stdout)
++ sys.stderr.buffer.write(stderr)
+ return 0
+ except OSError:
# Ignore if clang-format is not installed.
pass
- # If any failure happens, continue with unformatted files.
--sys.stdout.write(contents)
-+sys.stdout.buffer.write(contents)
- for inputfile in inputfiles:
+ # If any failure happens, continue with unformatted files.
+- sys.stdout.write(contents)
++ sys.stdout.buffer.write(contents)
+ for inputfile in inputfiles:
- sys.stdout.write(open(inputfile).read())
+ sys.stdout.buffer.write(open(inputfile).read())
+
+ return 0
+
Show replies by date