summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-07-05 17:41:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-10 14:12:07 +0100
commit016e4a53e3251ffcdb3c260dd2837507b520ffa6 (patch)
treead8e7dd030291e1bf3c638ddf3c36eb4089a0f73
parent6483fbe70e52ec9a53c918fe81162fd0c566f80f (diff)
downloadopenembedded-core-contrib-016e4a53e3251ffcdb3c260dd2837507b520ffa6.tar.gz
openembedded-core-contrib-016e4a53e3251ffcdb3c260dd2837507b520ffa6.tar.bz2
openembedded-core-contrib-016e4a53e3251ffcdb3c260dd2837507b520ffa6.zip
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@intel.com>
-rw-r--r--meta/classes/libc-package.bbclass24
1 files changed, 2 insertions, 22 deletions
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 8349c2d3c0..c1781c64b4 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() {