<?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>669</bug_id>
          
          <creation_ts>2011-01-20 21:44:26 +0000</creation_ts>
          <short_desc>do_populate_sdk failure if build meta-toolchain-sdk from sstate</short_desc>
          <delta_ts>2011-02-08 17:10:32 +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>BitBake</product>
          <component>bitbake</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dongxiao Xu">dongxiao.xu</reporter>
          <assigned_to name="Dongxiao Xu">dongxiao.xu</assigned_to>
          <cc>kevin.tian</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</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>11540</commentid>
    <comment_count>0</comment_count>
    <who name="Dongxiao Xu">dongxiao.xu</who>
    <bug_when>2011-01-20 21:44:26 +0000</bug_when>
    <thetext>If build meta-toolchain-sdk from the sstate prebuilt result, an error will occur like:

| Downloading file:/home/dongxiao/poky.git/build-atom-pc/tmp/deploy/ipk/Packages.
| Updated list of available packages in /home/dongxiao/poky.git/build-atom-pc/tmp/work/core2-poky-linux/meta-toolchain-sdk-1.0-r0/sdk/image//var/lib/opkg/lists/oe.
| Downloading file:/home/dongxiao/poky.git/build-atom-pc/tmp/deploy/ipk/all/Packages.
| Updated list of available packages in /home/dongxiao/poky.git/build-atom-pc/tmp/work/core2-poky-linux/meta-toolchain-sdk-1.0-r0/sdk/image//var/lib/opkg/lists/oe-all.
| Downloading file:/home/dongxiao/poky.git/build-atom-pc/tmp/deploy/ipk/x86_64-nativesdk/Packages.
| Updated list of available packages in /home/dongxiao/poky.git/build-atom-pc/tmp/work/core2-poky-linux/meta-toolchain-sdk-1.0-r0/sdk/image//var/lib/opkg/lists/oe-x86_64-nativesdk.
| Collected errors:
|  * opkg_conf_parse_file: Duplicate src declaration (oe-x86_64-nativesdk file:/home/dongxiao/poky.git/build-atom-pc/tmp/deploy/ipk/x86_64-nativesdk). Skipping.
| + opkg-cl -f /home/dongxiao/poky.git/build-atom-pc/tmp/work/core2-poky-linux/meta-toolchain-sdk-1.0-r0/opkg-sdk.conf -o /home/dongxiao/poky.git/build-atom-pc/tmp/work/core2-poky-linux/meta-toolchain-sdk-1.0-r0/sdk/image --force-overwrite install task-sdk-host task-cross-canadian-i586
| Unknown package &apos;task-sdk-host&apos;.
| Unknown package &apos;task-cross-canadian-i586&apos;.
| Collected errors:
|  * opkg_conf_parse_file: Duplicate src declaration (oe-x86_64-nativesdk file:/home/dongxiao/poky.git/build-atom-pc/tmp/deploy/ipk/x86_64-nativesdk). Skipping.
|  * opkg_install_cmd: Cannot install package task-sdk-host.
|  * opkg_install_cmd: Cannot install package task-cross-canadian-i586.
| Function &apos;do_populate_sdk&apos; failed (see /home/dongxiao/poky.git/build-atom-pc/tmp/work/core2-poky-linux/meta-toolchain-sdk-1.0-r0/temp/log.do_populate_sdk.4397 for further information)
NOTE: package meta-toolchain-sdk-1.0-r0: task do_populate_sdk: Failed
ERROR: Task 9 (/home/dongxiao/poky.git/meta/recipes-core/meta/meta-toolchain-sdk.bb, do_populate_sdk) failed with exit code &apos;1&apos;


It is said that task-sdk-host and task-cross-canadian-i586 are unknown packages. If build from sstate, the ipk file is not generated due to the judgement sentence in package_ipk.bbclass:

dvar = bb.data.getVar(&apos;D&apos;, d, True)
if not os.path.exists(dvar):
        bb.debug(1, &quot;Nothing installed, nothing to do&quot;)
        return

For task-sdk-host and task-cross-canadian-i586, do_populate_sysroot and do_package can reuse the sstate result, however for deploy_rpm and deploy_ipk, they need to re-execute it and generate rpm and ipk file themselves. We know that sstate will not install the ${D} directory, thus according to the judgement sentence,  the ipk file will not be generated. 

Remove the above code should fix the problem. 

I will do some test and commit the patch for it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11700</commentid>
    <comment_count>1</comment_count>
    <who name="Dongxiao Xu">dongxiao.xu</who>
    <bug_when>2011-02-08 17:10:32 +0000</bug_when>
    <thetext>Fixed in commit http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=9e7eb5955af578256e5ccd6a45406f4fa6220dde</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>