mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-01-06 12:10:18 -05:00
Add a retry when stripping files on Linux
This commit is contained in:
parent
461ec48174
commit
051c25f1fa
@ -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]
|
||||
|
||||
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user