8000 FIX: Cache invalidation for translations and releases/. · python/docsbuild-scripts@e58783b · GitHub
[go: up one dir, main page]

Skip to content

Commit e58783b

Browse files
committed
FIX: Cache invalidation for translations and releases/.
1 parent e0bda11 commit e58783b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

build_docs.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,10 @@ def build_one(version, isdev, quick, sphinxbuild, build_root, www_root,
218218

219219
logging.info("%s files changed", len(changed))
220220
if changed and not skip_cache_invalidation:
221-
target_ino = os.stat(target).st_ino
222221
targets_dir = os.path.dirname(target)
223-
prefixes = []
224-
for fn in os.listdir(targets_dir):
225-
if os.stat(os.path.join(targets_dir, fn)).st_ino == target_ino:
226-
prefixes.append(fn)
222+
prefixes = shell_out('find -L {} -samefile {}'.format(
223+
targets_dir, target)).replace(targets_dir + '/', '')
224+
prefixes = [prefix for prefix in prefixes.split('\n') if prefix]
227225
to_purge = prefixes[:]
228226
for prefix in prefixes:
229227
to_purge.extend(prefix + "/" + p for p in changed)

0 commit comments

Comments
 (0)
0