<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>2203</bug_id>
          
          <creation_ts>2012-03-30 08:51:22 +0000</creation_ts>
          <short_desc>reading incorrect pkgdata in do_package_write_xxx of -nativesdk recipes</short_desc>
          <delta_ts>2012-04-17 08:34:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Lianhao Lu">lianhao.lu</reporter>
          <assigned_to name="Lianhao Lu">lianhao.lu</assigned_to>
          <cc>dongxiao.xu</cc>
    
    <cc>hongnax.xu</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>19691</commentid>
    <comment_count>0</comment_count>
    <who name="Lianhao Lu">lianhao.lu</who>
    <bug_when>2012-03-30 08:51:22 +0000</bug_when>
    <thetext>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 &quot;bitbake eglibc-nativesdk&quot;.
2. After that build, the eglibc&apos;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 &quot;bitbake eglibc-nativesdk&quot;(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 &quot;tmp/pkgata/x86_64-nativesdk-pokysdk-linux/runtime/eglibc-nativesdk&quot;, while it should return the correct one of &quot;tmp/pkgata/i686-nativesdk-pokysdk-linux/runtime/eglibc-nativesdk&quot;

The problem is in the variable PACKAGE_ARCHS. For -nativesdk recipe, it should be set to the same as SDK_PACKAGE_ARCHS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19743</commentid>
    <comment_count>1</comment_count>
    <who name="Lianhao Lu">lianhao.lu</who>
    <bug_when>2012-03-31 06:57:03 +0000</bug_when>
    <thetext>Patch sent out for review at
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=llu/nativesdkfixing&amp;id=d33b7d21b1cc23f7c20743d85a261c4d610e2f41</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19773</commentid>
    <comment_count>2</comment_count>
    <who name="Lianhao Lu">lianhao.lu</who>
    <bug_when>2012-04-01 08:54:11 +0000</bug_when>
    <thetext>Fixed in commit http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=404cced0c2226a7e4a49428ef3f8d16f1e4895cf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20509</commentid>
    <comment_count>3</comment_count>
    <who name="Hongna Xu">hongnax.xu</who>
    <bug_when>2012-04-17 08:34:50 +0000</bug_when>
    <thetext>Verify.

Tree/Branch: Poky/1.2_M4
Commit id: fae1c7a5fdcea199338b5f91efaafd7c72aec5dd</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>