]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: Only create symlinks to different localpath urls if the fetch succeeded
authorRichard Purdie <rpurdie@linux.intel.com>
Sat, 13 Nov 2010 12:08:23 +0000 (20:08 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Sat, 13 Nov 2010 12:08:23 +0000 (20:08 +0800)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/sstate.bbclass

index 5581af94b1a297ca1d5c2d3dd5bab470d5165a09..99fc63215a99aa57da79c29ed7fbb04a4a33efb4 100644 (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