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.
Patch sent out for review at http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=llu/nativesdkfixing&id=d33b7d21b1cc23f7c20743d85a261c4d610e2f41
Fixed in commit http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=404cced0c2226a7e4a49428ef3f8d16f1e4895cf
Verify. Tree/Branch: Poky/1.2_M4 Commit id: fae1c7a5fdcea199338b5f91efaafd7c72aec5dd