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:
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
|
||||
if os.readlink(lnkfile) == target:
|
||||
continue
|
||||
os.unlink(lnkfile)
|
||||
elif os.path.exists(lnkfile):
|
||||
# File/dir exists with same name as link, just leave it alone
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue