| Summary: | Kernel srcs are not cleaned up when doing ccleansstate | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Khem Raj <raj.khem> |
| Component: | kernel | Assignee: | Darren Hart <dvhart> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | bruce.ashfield, dvhart, richard.purdie, tom.zanussi |
| Version: | 1.7 | ||
| Target Milestone: | 1.8 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Khem Raj
2014-10-07 22:38:48 UTC
FWIW. This has been around for a while. I've been hitting this for 2 releases (if my memory is correct) with perf builds when switching kernels. Build for one kernel version, change the preferred version to another. boom. You have to manually clean the sysroot and then force it to be populated again to build. Note that in this case, these looks like the files we generate in the sysroot, its not all the files, just the scripts/* ones. These are generated in the sysroot when we "make scripts" or whatever it is there for other modules. So somehow we need to find a way to better track and remove these. The trouble is they're not understate control. The current code changes mean we'll have two clear directories of kernel source and build artefacts, a clean of any kind of the kernel can clear them out completely with no impact on sstate. Assigning to Darren to handle this. I'm experimenting with:
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index ecde341..7a788d9 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -40,7 +40,8 @@ python __anonymous () {
# We need to move these over to STAGING_KERNEL_DIR. We can't just
# create the symlink in advance as the git fetcher can't cope with
# the symlink.
-do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B}"
+do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
+do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
Sorry to say I'm struggling to display the contents of "do_clean[cleandirs]" to verify what I've done...
OK, the above appears to work, thanks to nrossi for pointing me in the right direction for debugging VarFlags:
python __anonymous() {
print(d.getVarFlags("do_clean", "cleandirs"))
print(d.getVarFlags("do_unpack", "cleandirs"))
}
|