Bug 2203 - reading incorrect pkgdata in do_package_write_xxx of -nativesdk recipes
Summary: reading incorrect pkgdata in do_package_write_xxx of -nativesdk recipes
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: 1.2 M4
Assignee: Lianhao Lu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-03-30 08:51 UTC by Lianhao Lu
Modified: 2012-04-17 08:34 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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