linamh/sys-libs/glibc/files/eblits/pkg_postinst.eblit
2009-09-12 08:46:08 +00:00

30 lines
1.1 KiB
Plaintext

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_postinst.eblit,v 1.1 2009/03/01 21:06:22 vapier Exp $
eblit-glibc-pkg_postinst() {
# nothing to do if just installing headers
just_headers && return
if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
# Generate fastloading iconv module configuration file.
"${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
fi
if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
# Reload init ... if in a chroot or a diff init package, ignore
# errors from this step #253697
/sbin/telinit U 2>/dev/null
# if the host locales.gen contains no entries, we'll install everything
local locale_list="${ROOT}etc/locale.gen"
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${ROOT}usr/share/i18n/SUPPORTED"
fi
local x jobs
for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
locale-gen -j ${jobs:-1} --config "${locale_list}"
fi
}