| Summary: | ${D}/sysroot-only has race between do_populate_sysroot and do_package | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Callum Moffat <callum> |
| Component: | core | Assignee: | Ross Burton <ross.burton> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie |
| Version: | unspecified | ||
| Target Milestone: | 5.1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
We need to stop it chamging ${D}
Not a common error and unlikely so medium priority. Callum: where you using an old release when you found this bug? It appears to be resolved with poky f2016af0399250d2378818758c704c37a96e2ed6 which was in 4.1 onwards. Basically the patch does this: - shutil.rmtree(sysroot_only) - cmd = 'tar -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar) + cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar) Closing as I believe this is fixed. Oh you're right I am not at 4.1 yet. Yeah that snippet would fix it. Thanks. |
If both do_package and do_populate_sysroot tasks need to be run for a recipe, they may both run at the same time, because there isn't any specific dependency between them, besides the fact they both depend on do_install. If the /sysroot-only feature is used, it can cause an issue, because do_package may delete the /sysroot-only directory before do_populate_sysroot can copy it to the sysroot directory. If you use /sysroot-only, you could force the dependency with the following snippet in recipe do_package[depends] += "${PN}:do_populate_sysroot" But I think in oe-core, staging.bbclass and/or package.bbclass should be adjusted to avoid this race by default. Either the task order could be specified, or do_package could be changed to avoid mutating ${D}.