| Summary: | Installing binary in allarch recipe causes traceback | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Paul Eggleton <bluelightning> | ||||
| Component: | core | Assignee: | Costin <costin.c.constantin> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Costin <costin.c.constantin> | ||||
| Severity: | minor | ||||||
| Priority: | Medium+ | CC: | alexandru.c.georgescu, daniel.alexandrux.istrate, meta.mr.watcher, meta.watcher, sgw | ||||
| Version: | 1.8 | ||||||
| Target Milestone: | 1.9 M1 | ||||||
| Hardware: | All | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
Created attachment 2536 [details]
Example recipe
Attached an example recipe. This is totally synthetic, but at least triggers the error.
Investigation started. Patch sent for review. Fixed with commit: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=63e62599a6af469c1705c9272cd280b54d5b7144 Hi, Did a recipe with the content from comment #1 : cosscat@ubnt:/media/yp_builds/poky/meta/recipes-core/mytest$ ls mytest_1a.bb and created a simple executable /bin/file cosscat@ubnt:/bin$ ls file file after bitbaking the recipe, the process goes well and "file" gets copied in ${D}/${bindir} : cosscat@ubnt:/media/yp_builds/poky/build/tmp/work/all-poky-linux/mytest/1a-r0/image/usr/bin$ cat test-file #/bin/bash echo "hello" When i build it though, no err. message is displayed and build goes smooth. According to the description it should have displayed an error. Forgot to add, tested on latest master What kind of file is this "file" you are testing with? If it's not a binary (i.e. an executable that isn't a script) then you aren't replicating the case that should trigger the error. Moving to NEEDINFO based on the previous comment. The file i was using was a script. I created a small hello world alike binary and the issue is reproducing well. My fault in the first place. Based on the above will mark as verified. Marked as verified based on last comment |
If you install a prebuilt binary in a recipe that inherits allarch, you get a nasty traceback: -------------- snip -------------- ERROR: Error executing a python function in /home/user/poky/meta/recipes-core/example/example.bb: The stack trace of python calls that resulted in this exception/failure was: File: 'do_package_qa', lineno: 105, function: <module> 0101: bb.fatal("QA run found fatal errors. Please consider fixing them.") 0102: bb.note("DONE with PACKAGE QA") 0103: 0104: *** 0105:do_package_qa(d) 0106: File: 'do_package_qa', lineno: 88, function: do_package_qa 0084: package_qa_handle_error("pkgname", 0085: "%s doesn't match the [a-z0-9.+-]+ regex\n" % package, d) 0086: 0087: path = "%s/%s" % (pkgdest, package) *** 0088: if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d): 0089: walk_sane = False 0090: if not package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d): 0091: rdepends_sane = False 0092: if not package_qa_check_deps(package, pkgdest, skip, d): File: 'insane.bbclass', lineno: 19, function: package_qa_walk 0015: elf = None 0016: for func in warnfuncs: 0017: func(path, package, d, elf, warnings) 0018: for func in errorfuncs: *** 0019: func(path, package, d, elf, errors) 0020: 0021: for w in warnings: 0022: package_qa_handle_error(w, warnings[w], d) 0023: for e in errors: File: 'insane.bbclass', lineno: 25, function: package_qa_check_arch 0021: return 0022: 0023: #if this will throw an exception, then fix the dict above 0024: (machine, osabi, abiversion, littleendian, bits) \ *** 0025: = package_qa_get_machine_dict()[target_os][target_arch] 0026: 0027: # Check the architecture and endiannes of the binary 0028: if not ((machine == elf.machine()) or \ 0029: ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))): Exception: KeyError: 'allarch' ERROR: Function failed: do_package_qa ERROR: Logfile of failure stored in: /home/user/poky/build/tmp/work/all-poky-linux/example/1.0-r0/temp/log.do_package_qa.17373 ERROR: Task 9 (/home/user/poky/meta/recipes-core/example/example.bb, do_package_qa) failed with exit code '1' -------------- snip -------------- Obviously this should trigger an error, but it should be a proper error message telling the user what they've done wrong.