[oe-commits] [openembedded-core] 23/24: classes/libc-package: remove pointless copying when running localedef
git at git.openembedded.org
git at git.openembedded.org
Fri Jul 8 14:57:20 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 84107d6c02397acb7719f2d2797a97ac2000dcba
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Tue Jul 5 17:41:24 2016 +0100
classes/libc-package: remove pointless copying when running localedef
localedef handles attempts to read/write the archive in parallel correctly by
creating the file atomically, gracefully handling racing to create, and has
exclusive locks when writing. Therefore I can't see any purpose to copying the
archive to /tmp and back again when manipulating it.
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/libc-package.bbclass | 24 ++----------------------
1 file changed, 2 insertions(+), 22 deletions(-)
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 8349c2d..c1781c6 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -47,7 +47,6 @@ python __anonymous () {
OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
-# indentation removed on purpose
locale_base_postinst() {
#!/bin/sh
@@ -55,33 +54,14 @@ if [ "x$D" != "x" ]; then
exit 1
fi
-rm -rf ${TMP_LOCALE}
-mkdir -p ${TMP_LOCALE}
-if [ -f ${localedir}/locale-archive ]; then
- cp ${localedir}/locale-archive ${TMP_LOCALE}/
-fi
-localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s
-mkdir -p ${localedir}/
-mv ${TMP_LOCALE}/locale-archive ${localedir}/
-rm -rf ${TMP_LOCALE}
+localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s %s
}
-# indentation removed on purpose
locale_base_postrm() {
#!/bin/sh
-
-rm -rf ${TMP_LOCALE}
-mkdir -p ${TMP_LOCALE}
-if [ -f ${localedir}/locale-archive ]; then
- cp ${localedir}/locale-archive ${TMP_LOCALE}/
-fi
-localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s
-mv ${TMP_LOCALE}/locale-archive ${localedir}/
-rm -rf ${TMP_LOCALE}
+localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s %s
}
-
-TMP_LOCALE="/tmp/locale${localedir}"
LOCALETREESRC ?= "${PKGD}"
do_prep_locale_tree() {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list