diff options
Diffstat (limited to 'poky/meta/lib/oe/cve_check.py')
-rw-r--r-- | poky/meta/lib/oe/cve_check.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/poky/meta/lib/oe/cve_check.py b/poky/meta/lib/oe/cve_check.py index dc7d2e2826..aa06497727 100644 --- a/poky/meta/lib/oe/cve_check.py +++ b/poky/meta/lib/oe/cve_check.py @@ -163,3 +163,13 @@ def cve_check_merge_jsons(output, data): return output["package"].append(data["package"][0]) + +def update_symlinks(target_path, link_path): + """ + Update a symbolic link link_path to point to target_path. + Remove the link and recreate it if exist and is different. + """ + if link_path != target_path and os.path.exists(target_path): + if os.path.exists(os.path.realpath(link_path)): + os.remove(link_path) + os.symlink(os.path.basename(target_path), link_path) |