summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2016-09-13 04:48:32 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-16 15:24:02 +0100
commit06e56abbd25fe66b287e0bcd78787588939a3028 (patch)
tree282badfae42be799a7be66750cf9e44ed4e55191 /meta/lib/oe
parent55bb15f791b2fce15bcc1f6a0204206ab1cdc170 (diff)
downloadpoky-06e56abbd25fe66b287e0bcd78787588939a3028.tar.gz
package_manager.py: fix bitbake package-index failed
Previously the following commit in oe-core move RPM metadata from DEPLOY_DIR to WORKDIR. ----------- commit a92c196449c516fe51786d429078bbb1213bb029 Author: Stephano Cetola <stephano.cetola@linux.intel.com> Date: Wed Aug 10 13:03:16 2016 -0700 Allow for simultaneous do_rootfs tasks with rpm Give each rootfs its own RPM channel to use. This puts the RPM metadata in a private subdirectory of $WORKDIR, rather than living in DEPLOY_DIR where other tasks may race with it. ----------- In the modification of 'class RpmIndexer, it should not directly set arch_dir with WORKDIR. It caused 'bitbake package-index' could not work correctly. Assign WORKDIR as input parameter at RpmIndexer initial time could fix the issue. (From OE-Core rev: 3c8c8501d0a19b566a94a9e06afe40642b444958) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/package_manager.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 2802254f1f..30e1de99b9 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -176,7 +176,7 @@ class RpmIndexer(Indexer):
176 dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch) 176 dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch)
177 if os.path.exists(dbpath): 177 if os.path.exists(dbpath):
178 bb.utils.remove(dbpath, True) 178 bb.utils.remove(dbpath, True)
179 arch_dir = os.path.join(self.d.getVar('WORKDIR', True), 'rpms', arch) 179 arch_dir = os.path.join(self.deploy_dir, arch)
180 if not os.path.isdir(arch_dir): 180 if not os.path.isdir(arch_dir):
181 continue 181 continue
182 182
@@ -686,7 +686,8 @@ class RpmPM(PackageManager):
686 if not os.path.exists(self.d.expand('${T}/saved')): 686 if not os.path.exists(self.d.expand('${T}/saved')):
687 bb.utils.mkdirhier(self.d.expand('${T}/saved')) 687 bb.utils.mkdirhier(self.d.expand('${T}/saved'))
688 688
689 self.indexer = RpmIndexer(self.d, self.deploy_dir) 689 packageindex_dir = os.path.join(self.d.getVar('WORKDIR', True), 'rpms')
690 self.indexer = RpmIndexer(self.d, packageindex_dir)
690 self.pkgs_list = RpmPkgsList(self.d, self.target_rootfs, arch_var, os_var) 691 self.pkgs_list = RpmPkgsList(self.d, self.target_rootfs, arch_var, os_var)
691 692
692 self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var) 693 self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)