diff options
| -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 c1ca54b4ff..c86f393c6f 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
| @@ -440,13 +440,14 @@ def sstate_package(ss, d): | |||
| 440 | if not link.startswith(tmpdir): | 440 | if not link.startswith(tmpdir): |
| 441 | return | 441 | return |
| 442 | 442 | ||
| 443 | depth = link.rpartition(tmpdir)[2].count('/') | 443 | depth = outputpath.rpartition(tmpdir)[2].count('/') |
| 444 | base = link.partition(tmpdir)[2].strip() | 444 | base = link.partition(tmpdir)[2].strip() |
| 445 | while depth > 1: | 445 | while depth > 1: |
| 446 | base = "../" + base | 446 | base = "/.." + base |
| 447 | depth -= 1 | 447 | depth -= 1 |
| 448 | base = "." + base | ||
| 448 | 449 | ||
| 449 | bb.debug(2, "Replacing absolute path %s with relative path %s" % (link, base)) | 450 | bb.debug(2, "Replacing absolute path %s with relative path %s for %s" % (link, base, outputpath)) |
| 450 | os.remove(path) | 451 | os.remove(path) |
| 451 | os.symlink(base, path) | 452 | os.symlink(base, path) |
| 452 | 453 | ||
| @@ -464,11 +465,11 @@ def sstate_package(ss, d): | |||
| 464 | for walkroot, dirs, files in os.walk(state[1]): | 465 | for walkroot, dirs, files in os.walk(state[1]): |
| 465 | for file in files: | 466 | for file in files: |
| 466 | srcpath = os.path.join(walkroot, file) | 467 | srcpath = os.path.join(walkroot, file) |
| 467 | dstpath = srcpath.replace(state[1], sstatebuild + state[0]) | 468 | dstpath = srcpath.replace(state[1], state[2]) |
| 468 | make_relative_symlink(srcpath, dstpath, d) | 469 | make_relative_symlink(srcpath, dstpath, d) |
| 469 | for dir in dirs: | 470 | for dir in dirs: |
| 470 | srcpath = os.path.join(walkroot, dir) | 471 | srcpath = os.path.join(walkroot, dir) |
| 471 | dstpath = srcpath.replace(state[1], sstatebuild + state[0]) | 472 | dstpath = srcpath.replace(state[1], state[2]) |
| 472 | make_relative_symlink(srcpath, dstpath, d) | 473 | make_relative_symlink(srcpath, dstpath, d) |
| 473 | bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0])) | 474 | bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0])) |
| 474 | oe.path.copyhardlinktree(state[1], sstatebuild + state[0]) | 475 | oe.path.copyhardlinktree(state[1], sstatebuild + state[0]) |
