| Summary: | esdk creation on Toaster does not show necessary file in artifacts | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | brian avery <brian.avery> |
| Component: | toaster | Assignee: | David Reyna <david.reyna> |
| Status: | RESOLVED FIXED | QA Contact: | Libertad <libertad.gonzalez.de.la.cruz> |
| Severity: | normal | ||
| Priority: | Medium | CC: | jessica.zhang, stanciux.mihail |
| Version: | 2.3 | ||
| Target Milestone: | 2.3 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
brian avery
2016-12-22 20:43:32 UTC
When I ran this from the command line under the debugger, all of the expected SDK files were found scan_sdk_artifacts() and added.
When I ran this from within Toaster, the ESDK files were indeed not found. However, after much debugging I discovered they were in fact _not_ there when the event handler scan_sdk_artifacts() was executed, even thought that handle ran at least one minute after the date/times of the ESDK files.
It seems that the ESDK files are being moved to the "sdk" directory _after_ the Toaster handle is executed, which would explain why the timestamps are correct but misleading.
This was the definitive test:
def scan_sdk_artifacts(self, event):
...
logger.info("SDK_DATE:"+str(subprocess.Popen("date", \
stdout=subprocess.PIPE, shell=True, \
executable="/bin/bash").stdout.read()))
logger.info("SDK_LS:"+str(subprocess.Popen("ls -la /opt/dreyna \
/toaster_master/poky/build-toaster-2/tmp/deploy/sdk", \
stdout=subprocess.PIPE, shell=True, \
executable="/bin/bash").stdout.read()))
The "date" says the files should have been found, the the "ls" shows that they were not there yet.
In examining the event flow against the actual SDK_EXT file placement, plus the DEBUG information in "work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_populate_sdk_ext", it is clear that the population of "tmp/deploy/sdk" now happens after "do_populate_sdk_ext", which is why this is failing for Toaster. Specifically, the file placement now happens in the function "sstate_install()" in "meta/classes/sstate.bbclass". Here is what appears to be the pertinent commits: git log meta/classes/populate_sdk_ext ... commit e1de69667481749d4e1081210a3a216378d034c9 Date: Fri Sep 2 11:22:41 2016 +0100 populate_sdk_ext: Put populate_sdk_ext under sstate control commit 3c3962d27e659c1da153c588948122dae20a9d93 Date: Thu Sep 1 11:56:02 2016 +0300 populate_sdk_base: Put populate_sdk under sstate control The solution appears to be to hook "sstate_install" instead of "do_populate_sdk_ext" (which now only populates the package and not the top-level deploy directory). *** Bug 10851 has been marked as a duplicate of this bug. *** The solution had three parts: 1) Enable the TaskArtifacts event. It had been mostly implemented but not completed. 2) Make a special case for naming the SDK manifest file, because the meta used to create the file is lost from the data_smart environment by the time TaskArtifacts executes. 3) Add a scan_task_artifacts handler to add the SDK files from the manifest to the target. commit ba1d8e36917f9d048e0a6b1bc3450b492497c63c This patch provides the first half of the implementation of #10283. |