Bug 669 - do_populate_sdk failure if build meta-toolchain-sdk from sstate
Summary: do_populate_sdk failure if build meta-toolchain-sdk from sstate
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.0 M4
Assignee: Dongxiao Xu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-01-20 21:44 UTC by Dongxiao Xu
Modified: 2011-02-08 17:10 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 Dongxiao Xu 2011-01-20 21:44:26 UTC
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 'task-sdk-host'.
| Unknown package 'task-cross-canadian-i586'.
| 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 'do_populate_sdk' 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 '1'


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('D', d, True)
if not os.path.exists(dvar):
        bb.debug(1, "Nothing installed, nothing to do")
        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.