summaryrefslogtreecommitdiffstats
path: root/meta/classes/externalsrc.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-03-02 10:44:19 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-02 22:39:45 (GMT)
commit70153b478291a9c725f7cd9d04b87ef4e78565d1 (patch)
treee2b23e92575387c068ec947ece156b30553988d3 /meta/classes/externalsrc.bbclass
parenteac4061839873f87be9c37489ade5b7823228c6b (diff)
downloadpoky-70153b478291a9c725f7cd9d04b87ef4e78565d1.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. (From OE-Core rev: cb8f064e48c24dcb1a15a32cef3399f35e549bdc) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/externalsrc.bbclass')
-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 b608bd0..0ec338c 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -115,6 +115,7 @@ python externalsrc_configure_prefunc() {
115 # Link already exists, leave it if it points to the right location already 115 # Link already exists, leave it if it points to the right location already
116 if os.readlink(lnkfile) == target: 116 if os.readlink(lnkfile) == target:
117 continue 117 continue
118 os.unlink(lnkfile)
118 elif os.path.exists(lnkfile): 119 elif os.path.exists(lnkfile):
119 # File/dir exists with same name as link, just leave it alone 120 # File/dir exists with same name as link, just leave it alone
120 continue 121 continue