Bug 2203

Summary: reading incorrect pkgdata in do_package_write_xxx of -nativesdk recipes
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Lianhao Lu <lianhao.lu>
Component: meta-yoctoAssignee: Lianhao Lu <lianhao.lu>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: dongxiao.xu, hongnax.xu, poky.bs.watcher, poky.watcher, richard.purdie
Version: unspecified   
Target Milestone: 1.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Lianhao Lu 2012-03-30 08:51:22 UTC
Branch: Master
Tag: 1.2_M4rc1

Hongna reported a do_package_write_ipk error using the following scheme:

1. Set MACHINE=qemux86-64 and SDKMACHINE=x86_64, then "bitbake eglibc-nativesdk".
2. After that build, the eglibc's PR value gets bumped, i.e. from r20 to r22.
3. Use the same builddir, and set MACHINE=qemux86-64 and SDKMACHINE=i686, then "bitbake eglibc-nativesdk"(this time the new r22 eglibc-nativesdk is used), the task do_package_write_ipk would fail complaining about can NOT find PKGDEST directories of eglibc-nativesdk-r20.

By digging this further, I found that packagedata.bbclass is reading the wrong pkgdata files during do_package_write_xxx. The error happens in the function get_subpkgdata_fn() in meta/lib/oe/packagedata.py. 

get_subpkgdata_fn will try to search the first available pkgdata file for the arch specified in PACKAGE_ARCHS in reverse order. In the step 3 of the above case, the get_subpkgdata_fn returns the wrong pkgdata file name "tmp/pkgata/x86_64-nativesdk-pokysdk-linux/runtime/eglibc-nativesdk", while it should return the correct one of "tmp/pkgata/i686-nativesdk-pokysdk-linux/runtime/eglibc-nativesdk"

The problem is in the variable PACKAGE_ARCHS. For -nativesdk recipe, it should be set to the same as SDK_PACKAGE_ARCHS.
Comment 3 Hongna Xu 2012-04-17 08:34:50 UTC
Verify.

Tree/Branch: Poky/1.2_M4
Commit id: fae1c7a5fdcea199338b5f91efaafd7c72aec5dd