Bug 2822

Summary: rpm-createsolvedb.py fails to import os
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: coreAssignee: Robert Yang <liezhi.yang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: liang.li2, liezhi.yang, meta.mr.watcher, meta.watcher, nitin.a.kamble, richard.purdie, rongqing.li, sgw, song.liu, zhenfeng.zhao
Version: 1.3   
Target Milestone: 1.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: (autobuilder)(P2)(QA Testing Completed)(Done)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Ross Burton 2012-07-24 08:47:55 UTC
From http://autobuilder.yoctoproject.org:8010/builders/nightly/builds/585/steps/shell_43/logs/stdio:

| + rpm-createsolvedb.py rpm /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/qemux86 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i586 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all
| 'import site' failed; use -v for traceback
| Traceback (most recent call last):
| File "/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/scripts/rpm-createsolvedb.py", line 14, in 
| import sys, os
| ImportError: No module named os
| ERROR: Function failed: do_package_index (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/work/i586-poky-linux/package-index-1.0-r0/temp/log.do_package_index.22498 for further information)

Sounds like a python/pythonnative problem?
Comment 1 Robert Yang 2012-07-24 09:44:00 UTC
This is caused by the change of location of the native python (before: usr/bin/python, now: usr/bin/python-native/python), Add "inherit pythonnative" in  package-index.bb would fix the problem, I will send a pull request for it.
Comment 2 Nitin Kamble 2012-07-26 07:50:12 UTC
package-index recipe is failing similarly:

http://autobuilder.yoctoproject.org:8010/builders/nightly/builds/589/steps/shell_43/logs/stdio
Comment 3 Robert Yang 2012-07-26 08:16:18 UTC
(In reply to comment #2)
> package-index recipe is failing similarly:
> 
> http://autobuilder.yoctoproject.org:8010/builders/nightly/builds/589/steps/
> shell_43/logs/stdio

Thanks for reporting this, they are the same errors.
Comment 5 liang li 2012-08-08 09:34:37 UTC
verified on :
git info :87ffccb5dc184375e8807834e3b9b08ada708105
git branch: poky/master

test env:
host: ubuntu 12.04 x86_64

run "bitbake package-index":

Loading cache: 100% |###########################################| ETA:  00:00:00
Loaded 1135 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.15.3"
TARGET_ARCH       = "i586"
TARGET_OS         = "linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.2+snapshot-20120808"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        = "master:87ffccb5dc184375e8807834e3b9b08ada708105"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
......
NOTE: Running task 211 of 216 (ID: 7, /buildarea1/tester/test_git/meta/recipes-core/meta/package-index.bb, do_package_index)
NOTE: package package-index-1.0-r0: task do_populate_lic: Started
NOTE: package package-index-1.0-r0: task do_package_index: Started
NOTE: package package-index-1.0-r0: task do_populate_lic: Succeeded
NOTE: Running noexec task 215 of 216 (ID: 8, /buildarea1/tester/test_git/meta/recipes-core/meta/package-index.bb, do_package_write)
NOTE: package package-index-1.0-r0: task do_package_index: Succeeded
NOTE: Running noexec task 216 of 216 (ID: 10, /buildarea1/tester/test_git/meta/recipes-core/meta/package-index.bb, do_build)
NOTE: Tasks Summary: Attempted 216 tasks of which 209 didn't need to be rerun and all succeeded.
--------------------
no such error when build.