summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-03-01 18:26:31 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-02 16:06:24 (GMT)
commit39bbb914689dff9a4660c188f7255e3a30228ed8 (patch)
treec44129a163601e06d82aa926b880420c7768b95d
parent3c22a6c9983883e63c65804305e75ad16cad6b95 (diff)
downloadpoky-39bbb914689dff9a4660c188f7255e3a30228ed8.tar.gz
sdk: install specified locales into SDK
(From OE-Core rev: 9b1c3dbe79f67d3b46e0f90a73bce6c61f094a50) (From OE-Core rev: 13ad745bf40a5e3e08a4e1f3295353b395eec43d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 9fe1687..6f10139 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)
@@ -164,6 +177,7 @@ class RpmSdk(Sdk):
164 177
165 bb.note("Installing NATIVESDK packages") 178 bb.note("Installing NATIVESDK packages")
166 self._populate_sysroot(self.host_pm, self.host_manifest) 179 self._populate_sysroot(self.host_pm, self.host_manifest)
180 self.install_locales(self.host_pm)
167 181
168 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND")) 182 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
169 183
@@ -245,6 +259,7 @@ class OpkgSdk(Sdk):
245 259
246 bb.note("Installing NATIVESDK packages") 260 bb.note("Installing NATIVESDK packages")
247 self._populate_sysroot(self.host_pm, self.host_manifest) 261 self._populate_sysroot(self.host_pm, self.host_manifest)
262 self.install_locales(self.host_pm)
248 263
249 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND")) 264 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
250 265
@@ -329,6 +344,7 @@ class DpkgSdk(Sdk):
329 344
330 bb.note("Installing NATIVESDK packages") 345 bb.note("Installing NATIVESDK packages")
331 self._populate_sysroot(self.host_pm, self.host_manifest) 346 self._populate_sysroot(self.host_pm, self.host_manifest)
347 self.install_locales(self.host_pm)
332 348
333 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND")) 349 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
334 350