summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-04 17:28:18 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-05 14:13:48 (GMT)
commit1580cb8cefcb81fcca78edc89fb7b714f27dde24 (patch)
treef2313f3d7f90df07be793fc7d0d54d0de1a4e2e6
parent92765c87f8354e4a23098dc75b7152fd09bf4e4d (diff)
downloadpoky-1580cb8cefcb81fcca78edc89fb7b714f27dde24.tar.gz
glibc: Separate locale files to their own sstate task
Putting the locale and script files into the sysroot for use by their specific recipes used to be a simple way to share the files. With RSS, we don't want to copy these into many different recipes so put these files in their own sstate task. (From OE-Core rev: c283f2532851e2a65e08fe7b3fd71c5d9abb70f2) (From OE-Core rev: bb95c7f9edfc73ad9c5ef47a5e897b19086030a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/glibc/glibc-collateral.inc2
-rw-r--r--meta/recipes-core/glibc/glibc-initial.inc2
-rw-r--r--meta/recipes-core/glibc/glibc-locale.inc2
-rw-r--r--meta/recipes-core/glibc/glibc-mtrace.inc2
-rw-r--r--meta/recipes-core/glibc/glibc-package.inc30
-rw-r--r--meta/recipes-core/glibc/glibc-scripts.inc2
6 files changed, 23 insertions, 17 deletions
diff --git a/meta/recipes-core/glibc/glibc-collateral.inc b/meta/recipes-core/glibc/glibc-collateral.inc
index 60655eb..5159a6d 100644
--- a/meta/recipes-core/glibc/glibc-collateral.inc
+++ b/meta/recipes-core/glibc/glibc-collateral.inc
@@ -15,7 +15,7 @@ do_patch[noexec] = "1"
15do_configure[noexec] = "1" 15do_configure[noexec] = "1"
16do_compile[noexec] = "1" 16do_compile[noexec] = "1"
17 17
18do_install[depends] += "virtual/${MLPREFIX}libc:do_populate_sysroot" 18do_install[depends] += "virtual/${MLPREFIX}libc:do_stash_locale"
19 19
20COMPATIBLE_HOST_libc-musl_class-target = "null" 20COMPATIBLE_HOST_libc-musl_class-target = "null"
21COMPATIBLE_HOST_libc-uclibc_class-target = "null" 21COMPATIBLE_HOST_libc-uclibc_class-target = "null"
diff --git a/meta/recipes-core/glibc/glibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc
index 2e3bc81..8058b68 100644
--- a/meta/recipes-core/glibc/glibc-initial.inc
+++ b/meta/recipes-core/glibc/glibc-initial.inc
@@ -48,7 +48,7 @@ do_install () {
48 done 48 done
49} 49}
50 50
51do_install_locale() { 51do_stash_locale() {
52 : 52 :
53} 53}
54 54
diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc
index 664edb2..d09e6e3 100644
--- a/meta/recipes-core/glibc/glibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -69,7 +69,7 @@ DESCRIPTION_localedef = "glibc: compile locale definition files"
69FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*" 69FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
70FILES_localedef = "${bindir}/localedef" 70FILES_localedef = "${bindir}/localedef"
71 71
72LOCALETREESRC = "${STAGING_INCDIR}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}" 72LOCALETREESRC = "${STAGING_DIR}-components/${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} ${D}${libdir}
diff --git a/meta/recipes-core/glibc/glibc-mtrace.inc b/meta/recipes-core/glibc/glibc-mtrace.inc
index e12b079..a7f9f78 100644
--- a/meta/recipes-core/glibc/glibc-mtrace.inc
+++ b/meta/recipes-core/glibc/glibc-mtrace.inc
@@ -5,7 +5,7 @@ DESCRIPTION = "mtrace utility provided by glibc"
5RDEPENDS_${PN} = "perl" 5RDEPENDS_${PN} = "perl"
6RPROVIDES_${PN} = "libc-mtrace" 6RPROVIDES_${PN} = "libc-mtrace"
7 7
8SRC = "${STAGING_INCDIR}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}" 8SRC = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale/scripts"
9 9
10do_install() { 10do_install() {
11 install -d -m 0755 ${D}${bindir} 11 install -d -m 0755 ${D}${bindir}
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index bad6424..b8239e0 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -145,8 +145,11 @@ do_install_append_aarch64 () {
145 fi 145 fi
146} 146}
147 147
148do_install_locale () { 148LOCALESTASH = "${WORKDIR}/stashed-locale"
149 dest=${D}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS} 149bashscripts = "mtrace sotruss xtrace"
150
151do_stash_locale () {
152 dest=${LOCALESTASH}
150 install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir} 153 install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
151 if [ "${base_libdir}" != "${libdir}" ]; then 154 if [ "${base_libdir}" != "${libdir}" ]; then
152 cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir} 155 cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
@@ -166,14 +169,8 @@ do_install_locale () {
166 cp -fpPR ${D}${datadir}/* ${dest}${datadir} 169 cp -fpPR ${D}${datadir}/* ${dest}${datadir}
167 rm -rf ${D}${datadir}/locale/ 170 rm -rf ${D}${datadir}/locale/
168 cp -fpPR ${WORKDIR}/SUPPORTED ${dest} 171 cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
169}
170
171addtask do_install_locale after do_install before do_populate_sysroot do_package
172 172
173bashscripts = "mtrace sotruss xtrace" 173 target=${dest}/scripts
174
175do_evacuate_scripts () {
176 target=${D}${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
177 mkdir -p $target 174 mkdir -p $target
178 for i in ${bashscripts}; do 175 for i in ${bashscripts}; do
179 if [ -f ${D}${bindir}/$i ]; then 176 if [ -f ${D}${bindir}/$i ]; then
@@ -182,13 +179,22 @@ do_evacuate_scripts () {
182 done 179 done
183} 180}
184 181
185addtask evacuate_scripts after do_install before do_populate_sysroot do_package 182addtask do_stash_locale after do_install before do_populate_sysroot do_package
183do_stash_locale[dirs] = "${B}"
184do_stash_locale[cleandirs] = "${LOCALESTASH}"
185SSTATETASKS += "do_stash_locale"
186do_stash_locale[sstate-inputdirs] = "${LOCALESTASH}"
187do_stash_locale[sstate-outputdirs] = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale"
188do_stash_locale[sstate-fixmedir] = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale"
189
190python do_stash_locale_setscene () {
191 sstate_setscene(d)
192}
193addtask do_stash_locale_setscene
186 194
187PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess" 195PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess"
188 196
189glibc_package_preprocess () { 197glibc_package_preprocess () {
190 rm -rf ${PKGD}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
191 rm -rf ${PKGD}/${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
192 for i in ${bashscripts}; do 198 for i in ${bashscripts}; do
193 rm -f ${PKGD}${bindir}/$i 199 rm -f ${PKGD}${bindir}/$i
194 done 200 done
diff --git a/meta/recipes-core/glibc/glibc-scripts.inc b/meta/recipes-core/glibc/glibc-scripts.inc
index bce0a42..c661f2b 100644
--- a/meta/recipes-core/glibc/glibc-scripts.inc
+++ b/meta/recipes-core/glibc/glibc-scripts.inc
@@ -4,7 +4,7 @@ SUMMARY = "utility scripts provided by glibc"
4DESCRIPTION = "utility scripts provided by glibc" 4DESCRIPTION = "utility scripts provided by glibc"
5RDEPENDS_${PN} = "bash glibc-mtrace" 5RDEPENDS_${PN} = "bash glibc-mtrace"
6 6
7SRC = "${STAGING_INCDIR}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}" 7SRC = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale/scripts"
8 8
9bashscripts = "sotruss xtrace" 9bashscripts = "sotruss xtrace"
10 10