summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package_manager.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-04-01 14:17:06 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-02 12:02:37 +0100
commitb544b4b23658580ed3454310852fa8af35f46e78 (patch)
tree7988e2d6c13919d58c10fe3f5b94284cc1eec6ad /meta/lib/oe/package_manager.py
parent673d0224cd391fe6d99535c4eb060d56a239c3d8 (diff)
downloadpoky-b544b4b23658580ed3454310852fa8af35f46e78.tar.gz
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] (From OE-Core rev: fbaddd724855a829698d853a70eee86118d6a5e7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package_manager.py')
-rw-r--r--meta/lib/oe/package_manager.py6
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):
111 index_cmds = [] 111 index_cmds = []
112 rpm_dirs_found = False 112 rpm_dirs_found = False
113 for arch in archs: 113 for arch in archs:
114 dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch)
115 if os.path.exists(dbpath):
116 bb.utils.remove(dbpath, True)
114 arch_dir = os.path.join(self.deploy_dir, arch) 117 arch_dir = os.path.join(self.deploy_dir, arch)
115 if not os.path.isdir(arch_dir): 118 if not os.path.isdir(arch_dir):
116 continue 119 continue
117 120
118 index_cmds.append("%s --update -q %s" % (rpm_createrepo, arch_dir)) 121 index_cmds.append("%s --dbpath %s --update -q %s" % \
122 (rpm_createrepo, dbpath, arch_dir))
119 123
120 rpm_dirs_found = True 124 rpm_dirs_found = True
121 125