diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-04-01 14:17:06 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-02 12:00:55 +0100 |
commit | fbaddd724855a829698d853a70eee86118d6a5e7 (patch) | |
tree | 49fa2551da472dc09c67cebe96de8391a8e73f14 | |
parent | 7dc6d50ac1fc20a262b62330d950a8e30acdf0b6 (diff) | |
download | openembedded-core-fbaddd724855a829698d853a70eee86118d6a5e7.tar.gz openembedded-core-fbaddd724855a829698d853a70eee86118d6a5e7.tar.bz2 openembedded-core-fbaddd724855a829698d853a70eee86118d6a5e7.zip |
package_manager: call createrepo with --dbpath pointing inside WORKDIR
Rpm database in staging area is used only by createrepo.
createrepo fails with the error
"rpmdb: BDB0060 PANIC: fatal region error detected"
if rpm database is broken during previous run of createrepo.
Made createrepo to create rpm db in $WORKDIR/rpmdb/ from scratch
for every build and architecture. This should potentially fix the
failure as every run of createrepo will be using separate db.
[YOCTO #6571]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oe/package_manager.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 743c7cb496..ed0c9a7d3d 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py @@ -111,11 +111,15 @@ class RpmIndexer(Indexer): index_cmds = [] rpm_dirs_found = False for arch in archs: + dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch) + if os.path.exists(dbpath): + bb.utils.remove(dbpath, True) arch_dir = os.path.join(self.deploy_dir, arch) if not os.path.isdir(arch_dir): continue - index_cmds.append("%s --update -q %s" % (rpm_createrepo, arch_dir)) + index_cmds.append("%s --dbpath %s --update -q %s" % \ + (rpm_createrepo, dbpath, arch_dir)) rpm_dirs_found = True |