From ffb318b4b12988f10816cc4c8a1d474e54101f1c Mon Sep 17 00:00:00 2001 From: Matthew Westphall Date: Wed, 27 Nov 2024 16:54:23 -0600 Subject: [PATCH] remove faulty code that incorrectly skipped updating static data symlinks --- distrepos/symlink_utils.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/distrepos/symlink_utils.py b/distrepos/symlink_utils.py index f366c75..6f4a30f 100644 --- a/distrepos/symlink_utils.py +++ b/distrepos/symlink_utils.py @@ -49,12 +49,8 @@ def link_static_data(options: Options, repo_name: str = "osg") -> t.Tuple[bool, # create missing symlinks to static_src in data_dist for pth in static_src.iterdir(): dest = data_dst / pth.name - # Continue if symlink is already correct - if dest.is_symlink() and dest.readlink() == pth: - continue - - if dest.is_symlink() and dest.readlink() != pth: - # Reassign incorrect symlinks + if dest.exists() and dest.is_symlink(): + # Unlink, then re-link the symlink dest.unlink() elif dest.exists(): # Fail if dest is not a symlink