diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-06 17:54:15 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-08 12:37:20 +0000 |
| commit | d702d9a926c5f3bc30b14941418f1db74f14468b (patch) | |
| tree | 92f714ab13ebdf04164f13ad5b1f05181a59ed52 /meta/classes-global/sstate.bbclass | |
| parent | c323d56244644964d68e012e688b3339492e50c4 (diff) | |
| download | poky-d702d9a926c5f3bc30b14941418f1db74f14468b.tar.gz | |
sstate: Ensure errors cause task failure
(From OE-Core rev: c1491ef7afc8722927c568b0ac0ddbbc84837ca3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global/sstate.bbclass')
| -rw-r--r-- | meta/classes-global/sstate.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass index decfb5adef..2c259a6657 100644 --- a/meta/classes-global/sstate.bbclass +++ b/meta/classes-global/sstate.bbclass | |||
| @@ -646,6 +646,7 @@ def sstate_package(ss, d): | |||
| 646 | d.setVar("SSTATE_CURRTASK", ss['task']) | 646 | d.setVar("SSTATE_CURRTASK", ss['task']) |
| 647 | bb.utils.remove(sstatebuild, recurse=True) | 647 | bb.utils.remove(sstatebuild, recurse=True) |
| 648 | bb.utils.mkdirhier(sstatebuild) | 648 | bb.utils.mkdirhier(sstatebuild) |
| 649 | exit = False | ||
| 649 | for state in ss['dirs']: | 650 | for state in ss['dirs']: |
| 650 | if not os.path.exists(state[1]): | 651 | if not os.path.exists(state[1]): |
| 651 | continue | 652 | continue |
| @@ -664,8 +665,11 @@ def sstate_package(ss, d): | |||
| 664 | if not link.startswith(tmpdir): | 665 | if not link.startswith(tmpdir): |
| 665 | continue | 666 | continue |
| 666 | bb.error("sstate found an absolute path symlink %s pointing at %s. Please replace this with a relative link." % (srcpath, link)) | 667 | bb.error("sstate found an absolute path symlink %s pointing at %s. Please replace this with a relative link." % (srcpath, link)) |
| 668 | exit = True | ||
| 667 | bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0])) | 669 | bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0])) |
| 668 | bb.utils.rename(state[1], sstatebuild + state[0]) | 670 | bb.utils.rename(state[1], sstatebuild + state[0]) |
| 671 | if exit: | ||
| 672 | bb.fatal("Failing task due to absolute path symlinks") | ||
| 669 | 673 | ||
| 670 | workdir = d.getVar('WORKDIR') | 674 | workdir = d.getVar('WORKDIR') |
| 671 | sharedworkdir = os.path.join(d.getVar('TMPDIR'), "work-shared") | 675 | sharedworkdir = os.path.join(d.getVar('TMPDIR'), "work-shared") |
