From: Richard Purdie Date: Sat, 13 Nov 2010 12:08:23 +0000 (+0800) Subject: sstate.bbclass: Only create symlinks to different localpath urls if the fetch succeeded X-Git-Tag: 2011-1~4094 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=d6e8f7d8a6a2a0f46a2a92e2f3fa6afd25a39acd;p=openembedded-core.git sstate.bbclass: Only create symlinks to different localpath urls if the fetch succeeded Signed-off-by: Richard Purdie --- 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): 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