Bug 2753 - createrepo failing with assertion in do_package_index
Summary: createrepo failing with assertion in do_package_index
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: High normal
Target Milestone: 1.3 M3
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard: (Scheduled) (autobuilder)(QA Testing ...
Depends on:
Blocks: 2800
  Show dependency tree
 
Reported: 2012-07-12 13:55 UTC by Paul Eggleton
Modified: 2012-08-17 11:27 UTC (History)
10 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
error do rootfs log (2.98 KB, application/octet-stream)
2012-08-17 08:43 UTC, liang li
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2012-07-12 13:55:51 UTC
From the autobuilder log http://autobuilder.yoctoproject.org:8010/builders/nightly/builds/568/steps/shell_43/logs/stdio :

----------------------------------------
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.13937 for further information)
ERROR: Logfile of failure stored in: /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.13937
Log data follows:
| DEBUG: Executing shell function do_package_index
| + package_update_index_rpm
| + '[' '!' -z '' ']'
| + base_archs='all any noarch x86 i386 i486 i586 qemux86'
| + ml_archs=
| + package_update_index_rpm_common /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/solvedb base_archs ml_archs
| + rpmconf_base=/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/solvedb
| + shift
| + createdirs=
| + for archvar in '"$@"'
| + eval 'archs=${base_archs}'
| ++ archs='all any noarch x86 i386 i486 i586 qemux86'
| + packagedirs=
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all/solvedb.done
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any/solvedb.done
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch/solvedb.done
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/x86 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/x86/solvedb.done
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i386 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/x86 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i386/solvedb.done
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i486 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i386 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/x86 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i486/solvedb.done
| + for arch in '$archs'
| + packagedirs='/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/i486 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i386 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/x86 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i586/solvedb.done
| + for arch in '$archs'
| + packagedirs='/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/i486 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i386 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/x86 /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/qemux86/solvedb.done
| + cat /dev/null
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/qemux86/ ']'
| + echo 'Generating solve db for /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/qemux86...'
| Generating solve db for /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/qemux86...
| + echo /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/qemux86/solvedb
| + createdirs=' /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/qemux86'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i586/ ']'
| + echo 'Generating solve db for /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i586...'
| Generating solve db for /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i586...
| + echo /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i586/solvedb
| + createdirs=' /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'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i486/ ']'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i386/ ']'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/x86/ ']'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch/ ']'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any/ ']'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all/ ']'
| + echo 'Generating solve db for /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all...'
| Generating solve db for /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all...
| + echo /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all/solvedb
| + createdirs=' /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'
| + for archvar in '"$@"'
| + eval 'archs=${ml_archs}'
| ++ archs=
| + packagedirs=
| + cat /dev/null
| + 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
|    total:               1      0.000000 MB      3.538581 secs
|    fingerprint:      1911      0.109488 MB      0.713564 secs
|    install:           637      0.000000 MB      0.923472 secs
|    digest:           1274     15.791024 MB      0.045207 secs
|    signature:        1274      0.000000 MB      1.476189 secs
|    dbadd:             637      0.000000 MB      0.909035 secs
|    dbget:           18123      3.992124 MB      0.021511 secs
|    dbput:             637      8.652480 MB      0.751585 secs
|    readhdr:          6371     17.054928 MB      0.014940 secs
|    hdrload:          3185     25.564624 MB      0.012855 secs
|    hdrget:         116683      0.000000 MB      0.094949 secs
|    total:               1      0.000000 MB     36.802765 secs
|    fingerprint:     23343      0.354344 MB      2.037273 secs
|    install:          7781      0.000000 MB     11.029619 secs
|    digest:          15562     74.473450 MB      0.233800 secs
|    signature:       15562      0.000000 MB     18.153664 secs
|    dbadd:            7781      0.000000 MB     10.867750 secs
|    dbget:          127166      0.117452 MB      0.197599 secs
|    dbput:            7781     45.401000 MB      9.017307 secs
|    readhdr:         77811     89.911050 MB      1.262800 secs
|    hdrload:         41603    148.285466 MB      0.161054 secs
|    hdrget:        1469068      0.000000 MB      0.952229 secs
|    total:               1      0.000000 MB      0.155011 secs
|    fingerprint:        96      0.003166 MB      0.001584 secs
|    install:            32      0.000000 MB      0.036793 secs
|    digest:             64      0.446192 MB      0.001313 secs
|    signature:          64      0.000000 MB      0.074482 secs
|    dbadd:              32      0.000000 MB      0.035846 secs
|    dbget:             619      0.000000 MB      0.000841 secs
|    dbput:              32      0.256968 MB      0.025805 secs
|    readhdr:           321      0.509776 MB      0.000614 secs
|    hdrload:           161      0.770160 MB      0.000540 secs
|    hdrget:           5006      0.000000 MB      0.003636 secs
| + base_archs='all any noarch i686-nativesdk'
| + package_update_index_rpm_common /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/solvedb-sdk base_archs
| + rpmconf_base=/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/solvedb-sdk
| + shift
| + createdirs=
| + for archvar in '"$@"'
| + eval 'archs=${base_archs}'
| ++ archs='all any noarch i686-nativesdk'
| + packagedirs=
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all/solvedb.done
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any/solvedb.done
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch/solvedb.done
| + for arch in '$archs'
| + packagedirs='/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i686-nativesdk /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all '
| + rm -rf /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i686-nativesdk/solvedb.done
| + cat /dev/null
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/i686-nativesdk/ ']'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/noarch/ ']'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/any/ ']'
| + for pkgdir in '$packagedirs'
| + '[' -e /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all/ ']'
| + echo 'Generating solve db for /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all...'
| Generating solve db for /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all...
| + echo /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all/solvedb
| + createdirs=' /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all'
| + rpm-createsolvedb.py rpm /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm/all
| + createrepo /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm
| python: dbconfig.c:493: db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed.
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/work/i586-poky-linux/package-index-1.0-r0/temp/run.do_package_index.13937: line 77: 13968 Aborted                 (core dumped) createrepo /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/build/tmp/deploy/rpm
| 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.13937 for further information)
----------------------------------------
Comment 1 Robert Yang 2012-07-19 14:08:52 UTC
I found other errors, the creatrepo-native needs libxml2-native to run, but it doesn't depend on it. But I can't reproduce this error, while I looked into the code,  the dbOpts needes the value defined in the rpm macro, and it is defined well, I'm not sure whether it has relations with the depends of libxml2-native, would you please show me the detailed reproduce steps, for example, which host , or I will send the pull request to fix the depends tomorrow.
Comment 2 Ross Burton 2012-07-19 14:13:07 UTC
The first comment has a link to the autobuilder log.  Many of the builders are seeing this.
Comment 3 Matthew McClintock 2012-07-19 15:59:32 UTC
My patch to rpm was just attempted to skip building one object file. dbconvert.c. Maybe I messed up something in the automake foo? I thought this was a trivial change?

-M
Comment 4 Ross Burton 2012-07-24 08:47:02 UTC
This problem has been fixed.  There is another one though...
Comment 5 liang li 2012-08-09 03:31:30 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.
Comment 6 Paul Eggleton 2012-08-15 09:51:18 UTC
The bad news is that this was not fixed previously - it was an intermittent issue that only came up when sstate packages were used from another machine with a different build path. The good news is that it should be fixed now, by the following commit:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d45bbc5c75a8f277fc1185a5f28847116eec376d
Comment 7 liang li 2012-08-15 10:21:58 UTC
(In reply to comment #6)
> The bad news is that this was not fixed previously - it was an intermittent
> issue that only came up when sstate packages were used from another machine
> with a different build path. The good news is that it should be fixed now,
> by the following commit:
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> ?id=d45bbc5c75a8f277fc1185a5f28847116eec376d

would you explain this more clearly? under which condition the error still exists ?
Comment 8 Paul Eggleton 2012-08-15 10:29:06 UTC
Sure, it will occur if you had built rpm on machine A, then on machine B that has a different TMPDIR path you build an image from scratch using the shared state package for rpm from machine A (to reproduce it easily, use all of the sstate-cache from machine A and the same build configuration, but a different TMPDIR path). The rpm libraries contain a hardcoded path to find the rpm macro files (usually etc/rpm under the native sysroot) and if these are not found by rpm when createrepo runs it, you will get the assertion in this bug report. The solution is to use a wrapper script that overrides these hardcoded paths at runtime for createrepo (using environment variables) as the commit above does.
Comment 9 liang li 2012-08-17 08:43:03 UTC
Created attachment 694 [details]
error do rootfs log

error log when run do_roofs task of "bitbake core-image-sato".
Comment 10 liang li 2012-08-17 08:45:53 UTC
(In reply to comment #8)
> Sure, it will occur if you had built rpm on machine A, then on machine B
> that has a different TMPDIR path you build an image from scratch using the
> shared state package for rpm from machine A (to reproduce it easily, use all
> of the sstate-cache from machine A and the same build configuration, but a
> different TMPDIR path). The rpm libraries contain a hardcoded path to find
> the rpm macro files (usually etc/rpm under the native sysroot) and if these
> are not found by rpm when createrepo runs it, you will get the assertion in
> this bug report. The solution is to use a wrapper script that overrides
> these hardcoded paths at runtime for createrepo (using environment
> variables) as the commit above does.


thanks, the error log is in attachment following your steps.
Comment 11 Paul Eggleton 2012-08-17 08:58:17 UTC
That's an error from rpmresolve, not createrepo (i.e. this is reproducing bug #2936). You'd need to apply the fix for that bug before you'll have any chance of reproducing this one prior to the fix for it.
Comment 12 liang li 2012-08-17 11:27:07 UTC
(In reply to comment #11)
> That's an error from rpmresolve, not createrepo (i.e. this is reproducing
> bug #2936). You'd need to apply the fix for that bug before you'll have any
> chance of reproducing this one prior to the fix for it.
thanks,maybe will find the way to reproduce it sometimes later.
the error log is similar to bug 2936 maybe like below (based on git commit 87ffccb5dc184375e8807834e3b9b08ada708105):
"python: dbconfig.c:493: db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed."

I tried the newest git branch to build core-image-sato image,no such error and image build success.
git info: af847d36375aa53f0c1ee2a00c97ba9f38837d1b  
git branch: poky/master