summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-03-02 23:44:19 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-02 22:39:07 +0000
commitcb8f064e48c24dcb1a15a32cef3399f35e549bdc (patch)
treebc932062e0f4a48dedeacbfb38fed1ca3f62f769
parent914b0a99997d8c69eafcb34dd982f46540eed882 (diff)
downloadopenembedded-core-contrib-cb8f064e48c24dcb1a15a32cef3399f35e549bdc.tar.gz
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/externalsrc.bbclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index b608bd04e8..0ec338c660 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -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