summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2018-12-05 08:00:54 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-05 22:30:19 +0000
commit7291426ed5eee92ba0eafc85a40a00f3c77da3f2 (patch)
treef2e4e37e344e6695872c533fac7e4ddf2f7df9ff /meta
parente67349dd55e3460139aef47bd0669cbef7704fb1 (diff)
downloadpoky-7291426ed5eee92ba0eafc85a40a00f3c77da3f2.tar.gz
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. (From OE-Core rev: 39840ed10af559bbcc306b378baa4723921668f5) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/libc-package.bbclass4
-rw-r--r--meta/recipes-core/glibc/glibc-locale.inc15
2 files changed, 10 insertions, 9 deletions
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 6b1e84ef7e..82d642e15e 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -39,9 +39,7 @@ python __anonymous () {
39 break 39 break
40 40
41 # try to fix disable charsets/locales/locale-code compile fail 41 # try to fix disable charsets/locales/locale-code compile fail
42 if bb.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \ 42 if bb.utils.contains('DISTRO_FEATURES', 'libc-charsets libc-locales libc-locale-code', True, False, d):
43 bb.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \
44 bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d):
45 d.setVar('PACKAGE_NO_GCONV', '0') 43 d.setVar('PACKAGE_NO_GCONV', '0')
46 else: 44 else:
47 d.setVar('PACKAGE_NO_GCONV', '1') 45 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 57b465dd5d..6384f9cbf1 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"
72LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale" 72LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale"
73 73
74do_install () { 74do_install () {
75 mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir} 75 mkdir -p ${D}${bindir} ${D}${datadir}
76 if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then 76 if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then
77 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${bindir}/* ${D}${bindir} 77 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
78 fi 78 fi
@@ -80,11 +80,14 @@ do_install () {
80 mkdir -p ${D}${localedir} 80 mkdir -p ${D}${localedir}
81 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${localedir}/* ${D}${localedir} 81 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${localedir}/* ${D}${localedir}
82 fi 82 fi
83 if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then 83 if [ ${@d.getVar('PACKAGE_NO_GCONV')} -eq 0 ]; then
84 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir} 84 mkdir -p ${D}${libdir}
85 fi 85 if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then
86 if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then 86 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
87 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir} 87 fi
88 if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then
89 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
90 fi
88 fi 91 fi
89 if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then 92 if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then
90 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/locale ${D}${datadir} 93 cp -R --no-dereference --preserve=mode,links ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}