sstate.bbclass: Only create symlinks to different localpath urls if the fetch succeeded

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie 2010-11-13 20:08:23 +08:00
parent 7333328c48
commit d6e8f7d8a6
1 changed files with 3 additions and 2 deletions

View File

@ -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