Skip to contentSkip to conversation

libc-package: remove obsolete do_configure_prepend

PATCH New Ross Burton 1 participant 2 messages Jul 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libc-package: remove obsolete do_configure_prepend

This fragment comes dates from when this class was used for more than just glibc locale packaging, and as glibc-locale disables do_configure it can't have been executed.

---
 meta/classes/libc-package.bbclass | 8 --------
 1 file changed, 8 deletions(-)
meta/classes/libc-package.bbclass +0 -8
index 6624746..a8d86cf 100644
@@ -47,14 +47,6 @@ python __anonymous () {
 
 OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
 
-do_configure_prepend() {
-        if [ -e ${S}/elf/ldd.bash.in ]; then
-                sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
-        fi
-}
-
-
-
 # indentation removed on purpose
 locale_base_postinst() {
 #!/bin/sh
Signature · 1 line
2.8.1
#1 lore raw

PATCH 2/2 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.

---
 meta/classes/libc-package.bbclass | 24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)
meta/classes/libc-package.bbclass +2 -22
index a8d86cf..8c99d61 100644
@@ -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() {
Signature · 1 line
2.8.1