Skip to contentSkip to conversation

sdk: Fix SDKIMAGE_LINGUAS handling

PATCH New Richard Weinberger 1 participant 1 message Jan 9, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sdk: Fix SDKIMAGE_LINGUAS handling

Currently SDKIMAGE_LINGUAS is broken for any inputs except "all". In the non-"all" case, each enabled language package is installed via pm.install("nativesdk-glibc-binary-localedata-%s.utf-8" % lang) This will throw a python exception since pm.install() expects a list of strings and not a string.

Fix the problem by constructing a list.
That way it is now also possible to call the package installer just once.

Cc "Burton, Ross" <[email protected]>
Fixes 67615e01751b ("rootfs_rpm.bbclass: migrate image creation to dnf")

---
Changes since v1, http://lists.openembedded.org/pipermail/openembedded-core/2018-December/277240.html
- Invoke the package installer just once (Ross Burton)

---
 meta/lib/oe/sdk.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oe/sdk.py +2 -2
index 153b07d76b40..878ee1647ff2 100644
@@ -95,8 +95,8 @@ class Sdk(object, metaclass=ABCMeta):
             if linguas == "all":
                 pm.install_glob("nativesdk-glibc-binary-localedata-*.utf-8", sdk=True)
             else:
-                for lang in linguas.split():
-                    pm.install("nativesdk-glibc-binary-localedata-%s.utf-8" % lang)
+                pm.install(["nativesdk-glibc-binary-localedata-%s.utf-8" % \
+                           lang for lang in linguas.split()])
             # Generate a locale archive of them
             target_arch = self.d.getVar('SDK_ARCH')
             rootfs = oe.path.join(self.sdk_host_sysroot, self.sdk_native_path)
Signature · 1 line
2.20.1