summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sstate.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 5581af94b..99fc63215 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -318,8 +318,9 @@ def pstaging_fetch(sstatepkg, d):
bb.fetch.go(localdata, [srcuri])
# Need to optimise this, if using file:// urls, the fetcher just changes the local path
# For now work around by symlinking
- if bb.data.expand(bb.fetch.localpath(srcuri, localdata), localdata) != sstatepkg:
- os.symlink(bb.data.expand(bb.fetch.localpath(srcuri, localdata), localdata), sstatepkg)
+ localpath = bb.data.expand(bb.fetch.localpath(srcuri, localdata), localdata)
+ if localpath != sstatepkg and os.path.exists(localpath):
+ os.symlink(localpath, sstatepkg)
except:
pass