From 051c25f1fa8456096d9d3dfdd087e83527e5f9d1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 21 Sep 2025 14:07:20 +0530 Subject: [PATCH] Add a retry when stripping files on Linux --- bypy/linux/__main__.py | 7 ++++++- bypy/sources.json | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bypy/linux/__main__.py b/bypy/linux/__main__.py index 6874f196ce..6a0e9beb31 100644 --- a/bypy/linux/__main__.py +++ b/bypy/linux/__main__.py @@ -254,7 +254,12 @@ def strip_files(files, argv_max=(256 * 1024)): all_files = cmd[len(STRIPCMD):] unwritable_files = tuple(filter(None, (None if os.access(x, os.W_OK) else (x, os.stat(x).st_mode) for x in all_files))) [os.chmod(x, stat.S_IWRITE | old_mode) for x, old_mode in unwritable_files] - subprocess.check_call(cmd) + try: + subprocess.check_call(cmd) + except subprocess.CalledProcessError: + # Sometimes get file is busy errors + time.sleep(1) + subprocess.check_call(cmd) [os.chmod(x, old_mode) for x, old_mode in unwritable_files] diff --git a/bypy/sources.json b/bypy/sources.json index 3acd331669..b273210839 100644 --- a/bypy/sources.json +++ b/bypy/sources.json @@ -328,6 +328,7 @@ { "name": "libxml2 2.15.0", + "comment": "When updating this, must rebuild at least: libxslt, lxml, html5-parser, podofo, qt-webengine", "unix": { "file_extension": "tar.xz", "hash": "sha256:5abc766497c5b1d6d99231f662e30c99402a90d03b06c67b62d6c1179dedd561",