Add a retry when stripping files on Linux

This commit is contained in:
Kovid Goyal 2025-09-21 14:07:20 +05:30
parent 461ec48174
commit 051c25f1fa
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 7 additions and 1 deletions

View File

@ -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]

View File

@ -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",