diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-11-13 20:08:23 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-11-13 20:08:23 +0800 |
commit | d6e8f7d8a6a2a0f46a2a92e2f3fa6afd25a39acd (patch) | |
tree | ae50c63a5474690d7f631a06c7b11c14cd12dd0e /meta/classes/sstate.bbclass | |
parent | 7333328c487e7b62db138e194d3516d7b751f67b (diff) | |
download | poky-d6e8f7d8a6a2a0f46a2a92e2f3fa6afd25a39acd.tar.gz |
sstate.bbclass: Only create symlinks to different localpath urls if the fetch succeeded
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 5581af94b1..99fc63215a 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -318,8 +318,9 @@ def pstaging_fetch(sstatepkg, d): | |||
318 | bb.fetch.go(localdata, [srcuri]) | 318 | bb.fetch.go(localdata, [srcuri]) |
319 | # Need to optimise this, if using file:// urls, the fetcher just changes the local path | 319 | # Need to optimise this, if using file:// urls, the fetcher just changes the local path |
320 | # For now work around by symlinking | 320 | # For now work around by symlinking |
321 | if bb.data.expand(bb.fetch.localpath(srcuri, localdata), localdata) != sstatepkg: | 321 | localpath = bb.data.expand(bb.fetch.localpath(srcuri, localdata), localdata) |
322 | os.symlink(bb.data.expand(bb.fetch.localpath(srcuri, localdata), localdata), sstatepkg) | 322 | if localpath != sstatepkg and os.path.exists(localpath): |
323 | os.symlink(localpath, sstatepkg) | ||
323 | except: | 324 | except: |
324 | pass | 325 | pass |
325 | 326 | ||