diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sstate.bbclass | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index fb30a18b72..3674a79060 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -278,6 +278,9 @@ def pstaging_fetch(sstatepkg, d): | |||
278 | 278 | ||
279 | dldir = bb.data.expand("${SSTATE_DIR}", localdata) | 279 | dldir = bb.data.expand("${SSTATE_DIR}", localdata) |
280 | srcuri = "file://" + os.path.basename(sstatepkg) | 280 | srcuri = "file://" + os.path.basename(sstatepkg) |
281 | |||
282 | bb.mkdirhier(dldir) | ||
283 | |||
281 | bb.data.setVar('DL_DIR', dldir, localdata) | 284 | bb.data.setVar('DL_DIR', dldir, localdata) |
282 | bb.data.setVar('PREMIRRORS', mirrors, localdata) | 285 | bb.data.setVar('PREMIRRORS', mirrors, localdata) |
283 | bb.data.setVar('SRC_URI', srcuri, localdata) | 286 | bb.data.setVar('SRC_URI', srcuri, localdata) |
@@ -285,8 +288,12 @@ def pstaging_fetch(sstatepkg, d): | |||
285 | # Try a fetch from the sstate mirror, if it fails just return and | 288 | # Try a fetch from the sstate mirror, if it fails just return and |
286 | # we will build the package | 289 | # we will build the package |
287 | try: | 290 | try: |
288 | bb.fetch.init([srcuri], pd) | 291 | bb.fetch.init([srcuri], localdata) |
289 | bb.fetch.go(pd, [srcuri]) | 292 | bb.fetch.go(localdata, [srcuri]) |
293 | # Need to optimise this, if using file:// urls, the fetcher just changes the local path | ||
294 | # For now work around by symlinking | ||
295 | if bb.data.expand(bb.fetch.localpath(srcuri, localdata), localdata) != sstatepkg: | ||
296 | os.symlink(bb.data.expand(bb.fetch.localpath(srcuri, localdata), localdata), sstatepkg) | ||
290 | except: | 297 | except: |
291 | pass | 298 | pass |
292 | 299 | ||
@@ -377,10 +384,10 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): | |||
377 | 384 | ||
378 | srcuri = "file://" + os.path.basename(sstatefile) | 385 | srcuri = "file://" + os.path.basename(sstatefile) |
379 | bb.data.setVar('SRC_URI', srcuri, localdata) | 386 | bb.data.setVar('SRC_URI', srcuri, localdata) |
380 | bb.note(str(srcuri)) | 387 | #bb.note(str(srcuri)) |
381 | 388 | ||
382 | try: | 389 | try: |
383 | bb.fetch.init(srcuri.split(), d) | 390 | bb.fetch.init(srcuri.split(), localdata) |
384 | bb.fetch.checkstatus(localdata) | 391 | bb.fetch.checkstatus(localdata) |
385 | ret.append(task) | 392 | ret.append(task) |
386 | except: | 393 | except: |