diff mbox series

[08/11] sdk: install specified locales into SDK

Message ID 20180301182634.20502-8-ross.burton@intel.com
State Accepted
Commit 9b1c3dbe79f67d3b46e0f90a73bce6c61f094a50
Headers show
Series [01/11] glibc: Upgrade to 2.27 release | expand

Commit Message

Ross Burton March 1, 2018, 6:26 p.m. UTC
Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/lib/oe/sdk.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index 6dc96b5f064..aa6597a8495 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)
@@ -147,6 +160,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"))
 
@@ -230,6 +244,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"))
 
@@ -316,6 +331,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"))