From 24dad071d4f4dba114b1deefa2ac53c83f031bb3 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 28 Mar 2023 21:48:26 -0700 Subject: [PATCH] remove vestigial code --- lib/spack/spack/util/atomic_update.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/lib/spack/spack/util/atomic_update.py b/lib/spack/spack/util/atomic_update.py index 69466d22ea9..fd205ed7a64 100644 --- a/lib/spack/spack/util/atomic_update.py +++ b/lib/spack/spack/util/atomic_update.py @@ -42,20 +42,6 @@ def renameat2(): return _renameat2 -def atomic_update(oldpath, newpath): - """ - atomically update newpath to contain the information at oldpath - - on linux systems supporting renameat2, the paths are swapped. - on other systems, oldpath is not affected but all paths are abstracted - by a symlink to allow for atomic updates. - """ - if renameat2(): - return atomic_update_renameat2(oldpath, newpath) - else: - return atomic_update_symlink(oldpath, newpath) - - def atomic_update_renameat2(src, dest): # Ensure a directory that is a symlink will not be read as symlink in libc src = src.rstrip(os.path.sep) @@ -73,9 +59,6 @@ def atomic_update_renameat2(src, dest): except (OSError, IOError): if not dest_exists: os.unlink(dest) - # Some filesystems don't support this - # fail over to symlink method - atomic_update_symlink(src, dest) def atomic_update_symlink(src, dest):