diff options
| -rw-r--r-- | meta/classes/sstate.bbclass | 2 | ||||
| -rw-r--r-- | meta/classes/staging.bbclass | 33 |
2 files changed, 34 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 17dcf4cc17..fd9acbab9b 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
| @@ -94,7 +94,7 @@ SSTATE_ARCHS[vardepsexclude] = "ORIGNATIVELSBSTRING" | |||
| 94 | 94 | ||
| 95 | SSTATE_MANMACH ?= "${SSTATE_PKGARCH}" | 95 | SSTATE_MANMACH ?= "${SSTATE_PKGARCH}" |
| 96 | 96 | ||
| 97 | SSTATECREATEFUNCS = "sstate_hardcode_path" | 97 | SSTATECREATEFUNCS += "sstate_hardcode_path" |
| 98 | SSTATECREATEFUNCS[vardeps] = "SSTATE_SCAN_FILES" | 98 | SSTATECREATEFUNCS[vardeps] = "SSTATE_SCAN_FILES" |
| 99 | SSTATEPOSTCREATEFUNCS = "" | 99 | SSTATEPOSTCREATEFUNCS = "" |
| 100 | SSTATEPREINSTFUNCS = "" | 100 | SSTATEPREINSTFUNCS = "" |
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 25f77c7735..b8a14ff02e 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
| @@ -624,3 +624,36 @@ python staging_taskhandler() { | |||
| 624 | } | 624 | } |
| 625 | staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess" | 625 | staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess" |
| 626 | addhandler staging_taskhandler | 626 | addhandler staging_taskhandler |
| 627 | |||
| 628 | |||
| 629 | # | ||
| 630 | # Target build output, stored in do_populate_sysroot or do_package can depend | ||
| 631 | # not only upon direct dependencies but also indirect ones. A good example is | ||
| 632 | # linux-libc-headers. The toolchain depends on this but most target recipes do | ||
| 633 | # not. There are some headers which are not used by the toolchain build and do | ||
| 634 | # not change the toolchain task output, hence the task hashes can change without | ||
| 635 | # changing the sysroot output of that recipe yet they can influence others. | ||
| 636 | # | ||
| 637 | # A specific example is rtc.h which can change rtcwake.c in util-linux but is not | ||
| 638 | # used in the glibc or gcc build. To account for this, we need to account for the | ||
| 639 | # populate_sysroot hashes in the task output hashes. | ||
| 640 | # | ||
| 641 | python target_add_sysroot_deps () { | ||
| 642 | current_task = "do_" + d.getVar("BB_CURRENTTASK") | ||
| 643 | if current_task not in ["do_populate_sysroot", "do_package"]: | ||
| 644 | return | ||
| 645 | |||
| 646 | pn = d.getVar("PN") | ||
| 647 | if pn.endswith("-native"): | ||
| 648 | return | ||
| 649 | |||
| 650 | taskdepdata = d.getVar("BB_TASKDEPDATA", False) | ||
| 651 | deps = {} | ||
| 652 | for dep in taskdepdata.values(): | ||
| 653 | if dep[1] == "do_populate_sysroot" and not dep[0].endswith(("-native", "-initial")) and "-cross-" not in dep[0]: | ||
| 654 | deps[dep[0]] = dep[6] | ||
| 655 | |||
| 656 | d.setVar("HASHEQUIV_EXTRA_SIGDATA", "\n".join("%s: %s" % (k, deps[k]) for k in sorted(deps.keys()))) | ||
| 657 | } | ||
| 658 | SSTATECREATEFUNCS += "target_add_sysroot_deps" | ||
| 659 | |||
