Bug 2134 - bitbake package-index fails for rpm
Summary: bitbake package-index fails for rpm
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.2 M4
Assignee: Andrei Gherzan
QA Contact:
URL:
Whiteboard: (1.2) 2012-04-11: Patch Review
Depends on:
Blocks:
 
Reported: 2012-03-16 13:39 UTC by Paul Eggleton
Modified: 2012-04-14 14:28 UTC (History)
6 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 Paul Eggleton 2012-03-16 13:39:51 UTC
bitbake package-index fails due to not being able to find the libxml2 bindings:

| + createrepo /home/paul/poky/poky/build/tmp/deploy/rpm
| Traceback (most recent call last):
|   File "/home/paul/poky/poky/build/tmp/sysroots/i686-linux/usr/share/createrepo/genpkgmetadata.py", line 27, in <module>
|     import libxml2
| ImportError: No module named libxml2
NOTE: package package-index-1.0-r0: task do_package_index: Failed

I suspect this is because the host python is being used instead of the native one since the libxml2 module does exist in the native sysroot.
Comment 1 Paul Eggleton 2012-03-29 16:50:59 UTC
I can no longer reproduce this after cleaning out TMPDIR, and it works fine on two other host machines. I'm aware I had some brokenness in there due to some other bugs, so I'm going to mark this one as WORKSFORME.
Comment 2 Richard Purdie 2012-03-31 17:10:00 UTC
Whilst I never saw the libxml issue, I consistently see:

| + rpm-createsolvedb.py rpm /media/build1/poky/build6/tmp/deploy/rpm/x86_64-nativesdk /media/build1/poky/build6/tERROR: Function failed: do_package_index (see /media/build1/poky/build6/tmp/work/i586-poky-linux/package-index-1.0-r0/temp/log.do_package_index.25555 for further information)
| mp/deploy/rpm/all
|    total:               1      0.000000 MB      1.339680 secs
|    fingerprint:       321      0.010880 MB      0.014860 secs
|    install:           107      0.000000 MB      0.131623 secs
|    dbadd:             107      0.000000 MB      0.129404 secs
|    dbget:            4085      0.011956 MB      0.003506 secs
|    dbput:             107      0.974936 MB      0.115491 secs
|    readhdr:          1071      1.937440 MB      1.093024 secs
|    hdrload:           550      3.034148 MB      0.002142 secs
|    hdrget:          19375      0.000000 MB      0.016254 secs
| + createrepo /media/build1/poky/build6/tmp/deploy/rpm
| Traceback (most recent call last):
|   File "/media/build1/poky/build6/tmp/sysroots/x86_64-linux/usr/share/createrepo/genpkgmetadata.py", line 26, in <module>
|     import rpm
| ImportError: No module named rpm
NOTE: package package-index-1.0-r0: task do_package_index: Failed
ERROR: Task 8 (/media/build1/poky/meta/recipes-core/meta/package-index.bb, do_package_index) failed with exit code '1'
NOTE: Tasks Summary: Attempted 215 tasks of which 206 didn't need to be rerun and 1 failed

:(
Comment 3 Andrei Gherzan 2012-04-10 10:04:07 UTC
The bug is that the native python used to run genpkgmetadata.py is picking up host's python modules.

More about this. RPM is built without python. And this modules is needed by the above py file.

So: 
1. rpm-native should be built with python support. 
2. native python should only look into STAGING_DIR_NATIVE directory for modules.

@g
Comment 4 Andrei Gherzan 2012-04-11 14:27:59 UTC
Fixed. Please check and test here:

http://lists.linuxtogo.org/pipermail/openembedded-core/2012-April/020892.html


@g
Comment 5 Andrei Gherzan 2012-04-11 14:30:07 UTC
Closed by mistake. Waiting for merge....
Comment 6 Richard Purdie 2012-04-14 14:28:12 UTC
Fixes merged into master ending with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=04b16f1038f7cae445d741e86c2cc19c70f991c1