summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-03-01 18:26:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-01 22:18:47 +0000
commit03b758892b87969945cca75472c62c184fcc4ba5 (patch)
tree36f12735856da5856bf0e1c34b836262825b486c /meta/lib/oe
parent8994767745683cf4746c5cfe83100cbe5a0e2eff (diff)
downloadpoky-03b758892b87969945cca75472c62c184fcc4ba5.tar.gz
sdk: install specified locales into SDK
(From OE-Core rev: 9b1c3dbe79f67d3b46e0f90a73bce6c61f094a50) 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/sdk.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index 6dc96b5f06..aa6597a849 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -84,6 +84,19 @@ class Sdk(object, metaclass=ABCMeta):
84 bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc()) 84 bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc())
85 bb.warn("cannot remove SDK dir: %s" % path) 85 bb.warn("cannot remove SDK dir: %s" % path)
86 86
87 def install_locales(self, pm):
88 linguas = self.d.getVar("SDKIMAGE_LINGUAS")
89 if linguas:
90 if linguas == "all":
91 pm.install_glob("nativesdk-locale-base-*.utf-8", sdk=True)
92 else:
93 for lang in linguas.split():
94 pm.install("nativesdk-locale-base-%s.utf-8" % lang)
95 else:
96 # No linguas so do nothing
97 pass
98
99
87class RpmSdk(Sdk): 100class RpmSdk(Sdk):
88 def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"): 101 def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"):
89 super(RpmSdk, self).__init__(d, manifest_dir) 102 super(RpmSdk, self).__init__(d, manifest_dir)
@@ -147,6 +160,7 @@ class RpmSdk(Sdk):
147 160
148 bb.note("Installing NATIVESDK packages") 161 bb.note("Installing NATIVESDK packages")
149 self._populate_sysroot(self.host_pm, self.host_manifest) 162 self._populate_sysroot(self.host_pm, self.host_manifest)
163 self.install_locales(self.host_pm)
150 164
151 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND")) 165 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
152 166
@@ -230,6 +244,7 @@ class OpkgSdk(Sdk):
230 244
231 bb.note("Installing NATIVESDK packages") 245 bb.note("Installing NATIVESDK packages")
232 self._populate_sysroot(self.host_pm, self.host_manifest) 246 self._populate_sysroot(self.host_pm, self.host_manifest)
247 self.install_locales(self.host_pm)
233 248
234 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND")) 249 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
235 250
@@ -316,6 +331,7 @@ class DpkgSdk(Sdk):
316 331
317 bb.note("Installing NATIVESDK packages") 332 bb.note("Installing NATIVESDK packages")
318 self._populate_sysroot(self.host_pm, self.host_manifest) 333 self._populate_sysroot(self.host_pm, self.host_manifest)
334 self.install_locales(self.host_pm)
319 335
320 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND")) 336 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
321 337