* [Buildroot] [PATCH 1/1] qt5webengine-chromium: fix python 3.13 issue
@ 2025-04-12 14:35 Gaël PORTAY
2025-04-19 20:09 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Gaël PORTAY @ 2025-04-12 14:35 UTC (permalink / raw)
To: buildroot; +Cc: Giulio Benetti, Julien Corjon, Gaël PORTAY
Python was bumped from 3.12.x to 3.13.x since the commit
d63e207eb869063f82c867658676c2903beb08cb.
The module pipes is no longer part of the Python standard library. It
was removed in Python 3.13 after being deprecated in Python 3.11. The
last version of Python that provided the pipes module was Python 3.12.
See[1].
The chromium project in qt5webengine-chromium is very old (87-based[2]).
This backports a change removing the use of pipes that was first
introduced in 114.0.5696.0[3] to fix the error below:
[174/23445] ACTION //components/resources:about_credits(/builds/buildroot.org/buildroot/output/build/qt5webengine-5.15.14/src/toolchain:target)
FAILED: gen/components/resources/about_credits.html
/builds/buildroot.org/buildroot/output/build/qt5webengine-5.15.14/host-bin/python ../../3rdparty/chromium/tools/licenses.py --target-os=linux --depfile gen/components/resources/about_credits.d credits gen/components/resources/about_credits.html
/builds/buildroot.org/buildroot/output/build/qt5webengine-5.15.14/src/3rdparty/chromium/build/android/gyp/util/build_utils.py:628: SyntaxWarning: invalid escape sequence '\('
r = re.compile('@FileArg\((.*?)\)')
Traceback (most recent call last):
File "/builds/buildroot.org/buildroot/output/build/qt5webengine-5.15.14/src/core/release/../../3rdparty/chromium/tools/licenses.py", line 37, in <module>
from util import build_utils
File "/builds/buildroot.org/buildroot/output/build/qt5webengine-5.15.14/src/3rdparty/chromium/build/android/gyp/util/build_utils.py", line 15, in <module>
import pipes
ModuleNotFoundError: No module named 'pipes'
[1]: https://docs.python.org/3/library/pipes.html
[2]: https://github.com/qt/qtwebengine/blob/v5.15.14-lts-lgpl/CHROMIUM_VERSION
[3]: https://github.com/chromium/chromium/commit/4c6fc1984970af4b2b1765014c9ddcd957ad7dda
Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/9677167367
Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
---
...-printed-cmd-when-long-commands-fail.patch | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 package/qt5/qt5webengine-chromium/0011-Shorted-printed-cmd-when-long-commands-fail.patch
diff --git a/package/qt5/qt5webengine-chromium/0011-Shorted-printed-cmd-when-long-commands-fail.patch b/package/qt5/qt5webengine-chromium/0011-Shorted-printed-cmd-when-long-commands-fail.patch
new file mode 100644
index 0000000000..908fe24e54
--- /dev/null
+++ b/package/qt5/qt5webengine-chromium/0011-Shorted-printed-cmd-when-long-commands-fail.patch
@@ -0,0 +1,57 @@
+From 1a713c6e4861f0672252425a1ccbfa9f45834d5d Mon Sep 17 00:00:00 2001
+From: Mohamed Heikal <mheikal@chromium.org>
+Date: Tue, 4 Apr 2023 17:04:04 +0000
+Subject: [PATCH] Shorted printed cmd when long commands fail
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Some commands (eg: javac) are very long and when they fail most of the
+screen/log is filled with the actual cmd vs the error message output.
+Shorten printed CMDs to 200 chars unless an environment variable is set.
+
+Bug: None
+Change-Id: I92809a7e4a2b1204931a74fd6239803feddd430e
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4395905
+Reviewed-by: Andrew Grieve <agrieve@chromium.org>
+Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#1126065}
+Upstream-Status: Backport [https://github.com/chromium/chromium/commit/4c6fc1984970af4b2b1765014c9ddcd957ad7dda]
+Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
+[gportay: remove import pipes]
+---
+ chromium/build/android/gyp/util/build_utils.py | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/chromium/build/android/gyp/util/build_utils.py b/chromium/build/android/gyp/util/build_utils.py
+index 02298051702..5fa753af459 100644
+--- a/chromium/build/android/gyp/util/build_utils.py
++++ b/chromium/build/android/gyp/util/build_utils.py
+@@ -12,7 +12,6 @@ import fnmatch
+ import json
+ import logging
+ import os
+-import pipes
+ import re
+ import shutil
+ import stat
+@@ -196,9 +195,14 @@ class CalledProcessError(Exception):
+
+ def __str__(self):
+ # A user should be able to simply copy and paste the command that failed
+- # into their shell.
++ # into their shell (unless it is more than 200 chars).
++ # User can set PRINT_FULL_COMMAND=1 to always print the full command.
++ print_full = os.environ.get('PRINT_FULL_COMMAND', '0') != '0'
++ full_cmd = shlex.join(self.args)
++ short_cmd = textwrap.shorten(full_cmd, width=200)
++ printed_cmd = full_cmd if print_full else short_cmd
+ copyable_command = '( cd {}; {} )'.format(os.path.abspath(self.cwd),
+- ' '.join(map(pipes.quote, self.args)))
++ printed_cmd)
+ return 'Command failed: {}\n{}'.format(copyable_command, self.output)
+
+
+--
+2.39.5
+
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] qt5webengine-chromium: fix python 3.13 issue
2025-04-12 14:35 [Buildroot] [PATCH 1/1] qt5webengine-chromium: fix python 3.13 issue Gaël PORTAY
@ 2025-04-19 20:09 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-04-19 20:09 UTC (permalink / raw)
To: Gaël PORTAY; +Cc: buildroot, Giulio Benetti, Julien Corjon
Hello Gaël,
On Sat, 12 Apr 2025 16:35:22 +0200
Gaël PORTAY <gael.portay+rtone@gmail.com> wrote:
> Python was bumped from 3.12.x to 3.13.x since the commit
> d63e207eb869063f82c867658676c2903beb08cb.
[...]
Thanks, I have applied your patch. Just two nits. First the title
prefix should have been package/qt5/qt5webengine-chromium.
> +Upstream-Status: Backport [https://github.com/chromium/chromium/commit/4c6fc1984970af4b2b1765014c9ddcd957ad7dda]
This should have been Upstream:, not Upstream-Status:, otherwise our
check-package tool complains.
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-19 20:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-12 14:35 [Buildroot] [PATCH 1/1] qt5webengine-chromium: fix python 3.13 issue Gaël PORTAY
2025-04-19 20:09 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox