summaryrefslogtreecommitdiffstats
path: root/meta/lib
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:49 +0100
commit20d2d2096a24a37094117468358aa24c77ffb04a (patch)
treef63aec14c3174dc7338896d856885226b3495ad7 /meta/lib
parenta274e39f0c8f57d9d3b8506a375021d50d8de53f (diff)
downloadpoky-20d2d2096a24a37094117468358aa24c77ffb04a.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: db21bdcba5e2f646f0dc47295e8ea7e4d49a880d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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