mirror of
https://git.yoctoproject.org/poky
synced 2026-02-05 16:28:43 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
dd9d183621
commit
0a45ba64ad
@@ -733,7 +733,7 @@ class Git(FetchMethod):
|
||||
to_remove.append(ud.fullshallow + ".done")
|
||||
|
||||
for r in to_remove:
|
||||
if os.path.exists(r):
|
||||
if os.path.exists(r) or os.path.islink(r):
|
||||
bb.note('Removing %s' % r)
|
||||
bb.utils.remove(r, True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user