diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sstate.bbclass | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 13abf33671..8074a2c255 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -431,13 +431,14 @@ def sstate_package(ss, d): | |||
431 | if not link.startswith(tmpdir): | 431 | if not link.startswith(tmpdir): |
432 | return | 432 | return |
433 | 433 | ||
434 | depth = link.rpartition(tmpdir)[2].count('/') | 434 | depth = outputpath.rpartition(tmpdir)[2].count('/') |
435 | base = link.partition(tmpdir)[2].strip() | 435 | base = link.partition(tmpdir)[2].strip() |
436 | while depth > 1: | 436 | while depth > 1: |
437 | base = "../" + base | 437 | base = "/.." + base |
438 | depth -= 1 | 438 | depth -= 1 |
439 | base = "." + base | ||
439 | 440 | ||
440 | bb.debug(2, "Replacing absolute path %s with relative path %s" % (link, base)) | 441 | bb.debug(2, "Replacing absolute path %s with relative path %s for %s" % (link, base, outputpath)) |
441 | os.remove(path) | 442 | os.remove(path) |
442 | os.symlink(base, path) | 443 | os.symlink(base, path) |
443 | 444 | ||
@@ -455,11 +456,11 @@ def sstate_package(ss, d): | |||
455 | for walkroot, dirs, files in os.walk(state[1]): | 456 | for walkroot, dirs, files in os.walk(state[1]): |
456 | for file in files: | 457 | for file in files: |
457 | srcpath = os.path.join(walkroot, file) | 458 | srcpath = os.path.join(walkroot, file) |
458 | dstpath = srcpath.replace(state[1], sstatebuild + state[0]) | 459 | dstpath = srcpath.replace(state[1], state[2]) |
459 | make_relative_symlink(srcpath, dstpath, d) | 460 | make_relative_symlink(srcpath, dstpath, d) |
460 | for dir in dirs: | 461 | for dir in dirs: |
461 | srcpath = os.path.join(walkroot, dir) | 462 | srcpath = os.path.join(walkroot, dir) |
462 | dstpath = srcpath.replace(state[1], sstatebuild + state[0]) | 463 | dstpath = srcpath.replace(state[1], state[2]) |
463 | make_relative_symlink(srcpath, dstpath, d) | 464 | make_relative_symlink(srcpath, dstpath, d) |
464 | bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0])) | 465 | bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0])) |
465 | oe.path.copyhardlinktree(state[1], sstatebuild + state[0]) | 466 | oe.path.copyhardlinktree(state[1], sstatebuild + state[0]) |