[oe-commits] [openembedded-core] 12/38: sdk: install specified locales into SDK

git at git.openembedded.org git at git.openembedded.org
Thu Apr 5 14:14:35 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch morty
in repository openembedded-core.

commit 691925df192b4b1671ba9d19cbc3602654826451
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Thu Mar 1 18:26:31 2018 +0000

    sdk: install specified locales into SDK
    
    (From OE-Core rev: 9b1c3dbe79f67d3b46e0f90a73bce6c61f094a50)
    
    (From OE-Core rev: f223f90d07965eef8ddbb047abd1f75da99b1c08)
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    [Fixup for getVar True bit]
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/lib/oe/sdk.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index af6ddc7..e33e215 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", True)
+        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)
@@ -165,6 +178,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", True))
 
@@ -244,6 +258,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", True))
 
@@ -328,6 +343,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", True))
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list