summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-21 23:17:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-22 10:39:10 +0000
commit902b77bf91d96517b935bce00a11003604dc3d54 (patch)
treeae6155b48ba64d4a0f5acae99130963648d980c7 /meta/lib
parent3ef5e034c654996c6f8fb90f116bb91877c2758a (diff)
downloadpoky-902b77bf91d96517b935bce00a11003604dc3d54.tar.gz
lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk repos don't conflict
The repository indexes updated during do_populate_sdk_ext and do_populate_sdk can conflcit. Add the missing lockfile calls for deb/ipk and in the rpm case, ensure different directories are used for the index for the two sdk cases. (From OE-Core rev: 5e5569c962c9ebc898eeb5044214e95117b190e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/package_manager.py5
-rw-r--r--meta/lib/oe/sdk.py10
2 files changed, 11 insertions, 4 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 0f85f3fb7c..2a07f0e39a 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -461,7 +461,8 @@ class RpmPM(PackageManager):
461 target_vendor, 461 target_vendor,
462 task_name='target', 462 task_name='target',
463 arch_var=None, 463 arch_var=None,
464 os_var=None): 464 os_var=None,
465 rpm_repo_workdir="oe-rootfs-repo"):
465 super(RpmPM, self).__init__(d) 466 super(RpmPM, self).__init__(d)
466 self.target_rootfs = target_rootfs 467 self.target_rootfs = target_rootfs
467 self.target_vendor = target_vendor 468 self.target_vendor = target_vendor
@@ -475,7 +476,7 @@ class RpmPM(PackageManager):
475 else: 476 else:
476 self.primary_arch = self.d.getVar('MACHINE_ARCH') 477 self.primary_arch = self.d.getVar('MACHINE_ARCH')
477 478
478 self.rpm_repo_dir = oe.path.join(self.d.getVar('WORKDIR'), "oe-rootfs-repo") 479 self.rpm_repo_dir = oe.path.join(self.d.getVar('WORKDIR'), rpm_repo_workdir)
479 bb.utils.mkdirhier(self.rpm_repo_dir) 480 bb.utils.mkdirhier(self.rpm_repo_dir)
480 oe.path.symlink(self.d.getVar('DEPLOY_DIR_RPM'), oe.path.join(self.rpm_repo_dir, "rpm"), True) 481 oe.path.symlink(self.d.getVar('DEPLOY_DIR_RPM'), oe.path.join(self.rpm_repo_dir, "rpm"), True)
481 482
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index dd02b8c12b..6dc96b5f06 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -85,7 +85,7 @@ class Sdk(object, metaclass=ABCMeta):
85 bb.warn("cannot remove SDK dir: %s" % path) 85 bb.warn("cannot remove SDK dir: %s" % path)
86 86
87class RpmSdk(Sdk): 87class RpmSdk(Sdk):
88 def __init__(self, d, manifest_dir=None): 88 def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"):
89 super(RpmSdk, self).__init__(d, manifest_dir) 89 super(RpmSdk, self).__init__(d, manifest_dir)
90 90
91 self.target_manifest = RpmManifest(d, self.manifest_dir, 91 self.target_manifest = RpmManifest(d, self.manifest_dir,
@@ -93,10 +93,15 @@ class RpmSdk(Sdk):
93 self.host_manifest = RpmManifest(d, self.manifest_dir, 93 self.host_manifest = RpmManifest(d, self.manifest_dir,
94 Manifest.MANIFEST_TYPE_SDK_HOST) 94 Manifest.MANIFEST_TYPE_SDK_HOST)
95 95
96 rpm_repo_workdir = "oe-sdk-repo"
97 if "sdk_ext" in d.getVar("BB_RUNTASK"):
98 rpm_repo_workdir = "oe-sdk-ext-repo"
99
96 self.target_pm = RpmPM(d, 100 self.target_pm = RpmPM(d,
97 self.sdk_target_sysroot, 101 self.sdk_target_sysroot,
98 self.d.getVar('TARGET_VENDOR'), 102 self.d.getVar('TARGET_VENDOR'),
99 'target', 103 'target',
104 rpm_repo_workdir=rpm_repo_workdir
100 ) 105 )
101 106
102 self.host_pm = RpmPM(d, 107 self.host_pm = RpmPM(d,
@@ -104,7 +109,8 @@ class RpmSdk(Sdk):
104 self.d.getVar('SDK_VENDOR'), 109 self.d.getVar('SDK_VENDOR'),
105 'host', 110 'host',
106 "SDK_PACKAGE_ARCHS", 111 "SDK_PACKAGE_ARCHS",
107 "SDK_OS" 112 "SDK_OS",
113 rpm_repo_workdir=rpm_repo_workdir
108 ) 114 )
109 115
110 def _populate_sysroot(self, pm, manifest): 116 def _populate_sysroot(self, pm, manifest):