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:17 +0100
commit586249ac8387885a29315e8fe332fab475c7a2da (patch)
treed02d87954ffb9019e561f1d1afa4b7aeb11c5012
parente2a150b1f957a669e0d6c9b908cf2234447e5dd4 (diff)
downloadpoky-586249ac8387885a29315e8fe332fab475c7a2da.tar.gz
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. (From OE-Core rev: 016e4a53e3251ffcdb3c260dd2837507b520ffa6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 () {
47 47
48OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}" 48OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
49 49
50# indentation removed on purpose
51locale_base_postinst() { 50locale_base_postinst() {
52#!/bin/sh 51#!/bin/sh
53 52
@@ -55,33 +54,14 @@ if [ "x$D" != "x" ]; then
55 exit 1 54 exit 1
56fi 55fi
57 56
58rm -rf ${TMP_LOCALE} 57localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s %s
59mkdir -p ${TMP_LOCALE}
60if [ -f ${localedir}/locale-archive ]; then
61 cp ${localedir}/locale-archive ${TMP_LOCALE}/
62fi
63localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s
64mkdir -p ${localedir}/
65mv ${TMP_LOCALE}/locale-archive ${localedir}/
66rm -rf ${TMP_LOCALE}
67} 58}
68 59
69# indentation removed on purpose
70locale_base_postrm() { 60locale_base_postrm() {
71#!/bin/sh 61#!/bin/sh
72 62localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s %s
73rm -rf ${TMP_LOCALE}
74mkdir -p ${TMP_LOCALE}
75if [ -f ${localedir}/locale-archive ]; then
76 cp ${localedir}/locale-archive ${TMP_LOCALE}/
77fi
78localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s
79mv ${TMP_LOCALE}/locale-archive ${localedir}/
80rm -rf ${TMP_LOCALE}
81} 63}
82 64
83
84TMP_LOCALE="/tmp/locale${localedir}"
85LOCALETREESRC ?= "${PKGD}" 65LOCALETREESRC ?= "${PKGD}"
86 66
87do_prep_locale_tree() { 67do_prep_locale_tree() {