summaryrefslogtreecommitdiffstats
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-26 15:06:23 +0100
commit55b2052883ec579599b41260bb5cb2433dd80b51 (patch)
tree358cfd1f3640c55842fabf2ba6f8a77f426e2c68
parent6c7c5f3e23278067a8585debe32dfd0955090b91 (diff)
downloadopenembedded-core-55b2052883ec579599b41260bb5cb2433dd80b51.tar.gz
openembedded-core-55b2052883ec579599b41260bb5cb2433dd80b51.tar.bz2
openembedded-core-55b2052883ec579599b41260bb5cb2433dd80b51.zip
sdk: install specified locales into SDK
(From OE-Core rev: 9b1c3dbe79f67d3b46e0f90a73bce6c61f094a50) (From OE-Core rev: 680956f20788201dc439e253c8fa12e7a21ecc56) 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 a3a6c39172..38f7b08e1c 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -84,6 +84,19 @@ class Sdk(object, metaclass=ABCMeta):
bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc())
bb.warn("cannot remove SDK dir: %s" % path)
+ def install_locales(self, pm):
+ linguas = self.d.getVar("SDKIMAGE_LINGUAS")
+ if linguas:
+ if linguas == "all":
+ pm.install_glob("nativesdk-locale-base-*.utf-8", sdk=True)
+ else:
+ for lang in linguas.split():
+ pm.install("nativesdk-locale-base-%s.utf-8" % lang)
+ else:
+ # No linguas so do nothing
+ pass
+
+
class RpmSdk(Sdk):
def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"):
super(RpmSdk, self).__init__(d, manifest_dir)
@@ -166,6 +179,7 @@ class RpmSdk(Sdk):
bb.note("Installing NATIVESDK packages")
self._populate_sysroot(self.host_pm, self.host_manifest)
+ self.install_locales(self.host_pm)
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
@@ -249,6 +263,7 @@ class OpkgSdk(Sdk):
bb.note("Installing NATIVESDK packages")
self._populate_sysroot(self.host_pm, self.host_manifest)
+ self.install_locales(self.host_pm)
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
@@ -335,6 +350,7 @@ class DpkgSdk(Sdk):
bb.note("Installing NATIVESDK packages")
self._populate_sysroot(self.host_pm, self.host_manifest)
+ self.install_locales(self.host_pm)
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))