[oe-commits] [openembedded-core] 03/10: glibc-locale: fix installed-vs-shipped qa issue

git at git.openembedded.org git at git.openembedded.org
Wed Dec 5 22:35:46 UTC 2018


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

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

commit 39840ed10af559bbcc306b378baa4723921668f5
Author: Kai Kang <kai.kang at windriver.com>
AuthorDate: Wed Dec 5 08:00:54 2018 -0500

    glibc-locale: fix installed-vs-shipped qa issue
    
    Variable PACKAGE_NO_GCONV is set in libc-package.bbclass when none of
    libc-charsets, libc-locales and libc-locale-code set in DISTRO_FEATURES.
    Then it causes installed-vs-shipped qa issue of glibc-locale:
    
    | ERROR: glibc-locale-2.28-r0 do_package: QA Issue: glibc-locale:
    | Files/directories were installed but not shipped in any package:
    |   /usr/share/i18n
    |   /usr/share/i18n/charmaps
    |   /usr/share/i18n/locales
    |   /usr/share/i18n/charmaps/CP737.gz
    |   ...
    |   /usr/share/i18n/locales/ru_RU
    |   ...
    |   /usr/lib64/gconv/gconv-modules
    | Please set FILES such that these items are packaged. Alternatively if they
    | are unneeded, avoid installing them or delete them within do_install.
    | glibc-locale: 843 installed and not shipped files. [installed-vs-shipped]
    
    So check PACKAGE_NO_GCONV during do_install and not copy those files if
    PACKAGE_NO_GCONV has been set.
    
    Simplify call of bb.utils.contains() in libc-package.bbclass as well.
    
    Signed-off-by: Kai Kang <kai.kang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/libc-package.bbclass        |  4 +---
 meta/recipes-core/glibc/glibc-locale.inc | 15 +++++++++------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 6b1e84e..82d642e 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -39,9 +39,7 @@ python __anonymous () {
                 break
 
     # try to fix disable charsets/locales/locale-code compile fail
-    if bb.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \
-            bb.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \
-            bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d):
+    if bb.utils.contains('DISTRO_FEATURES', 'libc-charsets libc-locales libc-locale-code', True, False, d):
         d.setVar('PACKAGE_NO_GCONV', '0')
     else:
         d.setVar('PACKAGE_NO_GCONV', '1')
diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc
index 57b465d..6384f9c 100644
--- a/meta/recipes-core/glibc/glibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -72,7 +72,7 @@ FILES_localedef = "${bindir}/localedef"
 LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale"
 
 do_install () {
-	mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
+	mkdir -p ${D}${bindir} ${D}${datadir}
 	if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then
 		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
 	fi
@@ -80,11 +80,14 @@ do_install () {
 		mkdir -p ${D}${localedir}
 		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${localedir}/* ${D}${localedir}
 	fi
-	if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then
-		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
-	fi
-	if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then
-		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
+	if [ ${@d.getVar('PACKAGE_NO_GCONV')} -eq 0 ]; then
+		mkdir -p ${D}${libdir}
+		if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then
+			cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
+		fi
+		if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then
+			cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
+		fi
 	fi
 	if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then
 		cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}

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


More information about the Openembedded-commits mailing list