diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2024-10-26 02:39:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-28 14:08:33 +0000 |
commit | 0a45ba64adbc279928a4347c5073eb78da1bf00a (patch) | |
tree | af9d8dc3a829f39a416adb357deea39d9eef3329 /bitbake/lib/bb/fetch2/git.py | |
parent | dd9d183621d583331cd17c7ea4c6dd7cc350e8aa (diff) | |
download | poky-0a45ba64adbc279928a4347c5073eb78da1bf00a.tar.gz |
bitbake: git: Clean broken symlink
The file may be a symlink when mirror from local disk, and the symlink will be
broken when the linked file is removed, use os.path.islink() to check and
remove the broken symlink.
(Bitbake rev: d0deb5fe6e7a84b07b49ef685b209729d2fdc780)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 0ea55e139d..6badda5972 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -733,7 +733,7 @@ class Git(FetchMethod): | |||
733 | to_remove.append(ud.fullshallow + ".done") | 733 | to_remove.append(ud.fullshallow + ".done") |
734 | 734 | ||
735 | for r in to_remove: | 735 | for r in to_remove: |
736 | if os.path.exists(r): | 736 | if os.path.exists(r) or os.path.islink(r): |
737 | bb.note('Removing %s' % r) | 737 | bb.note('Removing %s' % r) |
738 | bb.utils.remove(r, True) | 738 | bb.utils.remove(r, True) |
739 | 739 | ||