mirror of
https://git.yoctoproject.org/poky
synced 2026-09-15 06:49:33 +02:00
classes/externalsrc: fix symlinking if symlink exists pointing to another path
If the oe-workdir / oe-logs symlink exists and points to a different path then the symlink needs to be removed before calling os.symlink() or it'll fail. (From OE-Core rev: cb8f064e48c24dcb1a15a32cef3399f35e549bdc) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
eac4061839
commit
70153b4782
@@ -115,6 +115,7 @@ python externalsrc_configure_prefunc() {
|
|||||||
# Link already exists, leave it if it points to the right location already
|
# Link already exists, leave it if it points to the right location already
|
||||||
if os.readlink(lnkfile) == target:
|
if os.readlink(lnkfile) == target:
|
||||||
continue
|
continue
|
||||||
|
os.unlink(lnkfile)
|
||||||
elif os.path.exists(lnkfile):
|
elif os.path.exists(lnkfile):
|
||||||
# File/dir exists with same name as link, just leave it alone
|
# File/dir exists with same name as link, just leave it alone
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user