mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-17 02:11:06 +02:00
sys-libs/glibc: Sync with Gentoo
It's from Gentoo commit 390ba58c130c544f51729eac31bc8d8e66b01883. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
100c04eab9
commit
140e37ed10
@ -1234,7 +1234,7 @@ glibc_do_src_install() {
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile ; then
|
||||
if ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@ -1329,7 +1329,7 @@ pkg_postinst() {
|
||||
|
||||
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1393,7 +1393,7 @@ glibc_do_src_install() {
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile ; then
|
||||
if ! run_locale_gen "${ED%/}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
|
||||
fi
|
||||
@ -1494,7 +1494,7 @@ pkg_postinst() {
|
||||
|
||||
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1405,7 +1405,7 @@ glibc_do_src_install() {
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile ; then
|
||||
if ! run_locale_gen "${ED%/}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
|
||||
fi
|
||||
@ -1512,7 +1512,7 @@ pkg_postinst() {
|
||||
|
||||
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1454,7 +1454,7 @@ glibc_do_src_install() {
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile ; then
|
||||
if ! run_locale_gen "${ED%/}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
|
||||
fi
|
||||
@ -1577,7 +1577,7 @@ pkg_postinst() {
|
||||
|
||||
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1475,7 +1475,7 @@ glibc_do_src_install() {
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile ; then
|
||||
if ! run_locale_gen "${ED%/}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
|
||||
fi
|
||||
@ -1598,7 +1598,7 @@ pkg_postinst() {
|
||||
|
||||
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1483,7 +1483,7 @@ glibc_do_src_install() {
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile ; then
|
||||
if ! run_locale_gen "${ED%/}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
|
||||
fi
|
||||
@ -1606,7 +1606,7 @@ pkg_postinst() {
|
||||
|
||||
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1524,7 +1524,7 @@ glibc_do_src_install() {
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile ; then
|
||||
if ! run_locale_gen "${ED%/}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
|
||||
fi
|
||||
@ -1647,7 +1647,7 @@ pkg_postinst() {
|
||||
|
||||
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1538,7 +1538,7 @@ glibc_do_src_install() {
|
||||
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1662,7 +1662,7 @@ pkg_postinst() {
|
||||
|
||||
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1557,7 +1557,7 @@ glibc_do_src_install() {
|
||||
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1707,7 +1707,7 @@ pkg_postinst() {
|
||||
use loong && glibc_refresh_ldconfig
|
||||
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1567,7 +1567,7 @@ glibc_do_src_install() {
|
||||
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1718,7 +1718,7 @@ pkg_postinst() {
|
||||
use loong && glibc_refresh_ldconfig
|
||||
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1547,7 +1547,7 @@ glibc_do_src_install() {
|
||||
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
die "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1698,7 +1698,7 @@ pkg_postinst() {
|
||||
use loong && glibc_refresh_ldconfig
|
||||
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
ewarn "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
|
||||
# If fixincludes was/is active for a particular GCC slot, we
|
||||
|
@ -1316,7 +1316,8 @@ src_test() {
|
||||
# src_install
|
||||
|
||||
run_locale_gen() {
|
||||
local prefix=$1 user_config config
|
||||
local fatal=$1 prefix=$2
|
||||
local user_config action config stderr noun ret
|
||||
local -a hasversion_opts localegen_args
|
||||
|
||||
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
|
||||
@ -1345,7 +1346,27 @@ run_locale_gen() {
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
locale-gen "${localegen_args[@]}"
|
||||
{ stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
|
||||
ret=$?
|
||||
action="ewarn"
|
||||
if (( ret == 0 )); then
|
||||
noun="warning"
|
||||
else
|
||||
noun="error"
|
||||
if (( fatal )); then
|
||||
action="die"
|
||||
fi
|
||||
fi
|
||||
# Convey warnings/errors so that they can be reseen upon emerge exiting.
|
||||
if [[ ${stderr} ]]; then
|
||||
ewarn "locale-gen(8) issued the following ${noun}s:"
|
||||
while read -r; do
|
||||
ewarn "$REPLY"
|
||||
done <<<"${stderr}"
|
||||
fi
|
||||
if (( ret != 0 )); then
|
||||
"${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
}
|
||||
|
||||
glibc_do_src_install() {
|
||||
@ -1560,8 +1581,8 @@ glibc_do_src_install() {
|
||||
rm -f "${ED}"/etc/localtime
|
||||
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if use compile-locales && ! is_crosscompile; then
|
||||
run_locale_gen 1 "${ED}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1711,8 +1732,8 @@ pkg_postinst() {
|
||||
# window for the affected programs.
|
||||
use loong && glibc_refresh_ldconfig
|
||||
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if ! use compile-locales; then
|
||||
run_locale_gen 0 "${EROOT}"
|
||||
fi
|
||||
|
||||
# If fixincludes was/is active for a particular GCC slot, we
|
||||
|
@ -41,7 +41,7 @@ HOMEPAGE="https://www.gnu.org/software/libc/"
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
inherit git-r3
|
||||
else
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
|
||||
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
|
||||
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
|
||||
fi
|
||||
@ -1316,7 +1316,8 @@ src_test() {
|
||||
# src_install
|
||||
|
||||
run_locale_gen() {
|
||||
local prefix=$1 user_config config
|
||||
local fatal=$1 prefix=$2
|
||||
local user_config action config stderr noun ret
|
||||
local -a hasversion_opts localegen_args
|
||||
|
||||
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
|
||||
@ -1345,7 +1346,27 @@ run_locale_gen() {
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
locale-gen "${localegen_args[@]}"
|
||||
{ stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
|
||||
ret=$?
|
||||
action="ewarn"
|
||||
if (( ret == 0 )); then
|
||||
noun="warning"
|
||||
else
|
||||
noun="error"
|
||||
if (( fatal )); then
|
||||
action="die"
|
||||
fi
|
||||
fi
|
||||
# Convey warnings/errors so that they can be reseen upon emerge exiting.
|
||||
if [[ ${stderr} ]]; then
|
||||
ewarn "locale-gen(8) issued the following ${noun}s:"
|
||||
while read -r; do
|
||||
ewarn "$REPLY"
|
||||
done <<<"${stderr}"
|
||||
fi
|
||||
if (( ret != 0 )); then
|
||||
"${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
}
|
||||
|
||||
glibc_do_src_install() {
|
||||
@ -1560,8 +1581,8 @@ glibc_do_src_install() {
|
||||
rm -f "${ED}"/etc/localtime
|
||||
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if use compile-locales && ! is_crosscompile; then
|
||||
run_locale_gen 1 "${ED}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1711,8 +1732,8 @@ pkg_postinst() {
|
||||
# window for the affected programs.
|
||||
use loong && glibc_refresh_ldconfig
|
||||
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if ! use compile-locales; then
|
||||
run_locale_gen 0 "${EROOT}"
|
||||
fi
|
||||
|
||||
# If fixincludes was/is active for a particular GCC slot, we
|
||||
|
@ -1324,7 +1324,8 @@ src_test() {
|
||||
# src_install
|
||||
|
||||
run_locale_gen() {
|
||||
local prefix=$1 user_config config
|
||||
local fatal=$1 prefix=$2
|
||||
local user_config action config stderr noun ret
|
||||
local -a hasversion_opts localegen_args
|
||||
|
||||
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
|
||||
@ -1353,7 +1354,27 @@ run_locale_gen() {
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
locale-gen "${localegen_args[@]}"
|
||||
{ stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
|
||||
ret=$?
|
||||
action="ewarn"
|
||||
if (( ret == 0 )); then
|
||||
noun="warning"
|
||||
else
|
||||
noun="error"
|
||||
if (( fatal )); then
|
||||
action="die"
|
||||
fi
|
||||
fi
|
||||
# Convey warnings/errors so that they can be reseen upon emerge exiting.
|
||||
if [[ ${stderr} ]]; then
|
||||
ewarn "locale-gen(8) issued the following ${noun}s:"
|
||||
while read -r; do
|
||||
ewarn "$REPLY"
|
||||
done <<<"${stderr}"
|
||||
fi
|
||||
if (( ret != 0 )); then
|
||||
"${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
}
|
||||
|
||||
glibc_do_src_install() {
|
||||
@ -1568,8 +1589,8 @@ glibc_do_src_install() {
|
||||
rm -f "${ED}"/etc/localtime
|
||||
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if use compile-locales && ! is_crosscompile; then
|
||||
run_locale_gen 1 "${ED}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1719,8 +1740,8 @@ pkg_postinst() {
|
||||
# window for the affected programs.
|
||||
use loong && glibc_refresh_ldconfig
|
||||
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if ! use compile-locales; then
|
||||
run_locale_gen 0 "${EROOT}"
|
||||
fi
|
||||
|
||||
# If fixincludes was/is active for a particular GCC slot, we
|
||||
|
@ -1324,7 +1324,8 @@ src_test() {
|
||||
# src_install
|
||||
|
||||
run_locale_gen() {
|
||||
local prefix=$1 user_config config
|
||||
local fatal=$1 prefix=$2
|
||||
local user_config action config stderr noun ret
|
||||
local -a hasversion_opts localegen_args
|
||||
|
||||
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
|
||||
@ -1353,7 +1354,27 @@ run_locale_gen() {
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
locale-gen "${localegen_args[@]}"
|
||||
{ stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
|
||||
ret=$?
|
||||
action="ewarn"
|
||||
if (( ret == 0 )); then
|
||||
noun="warning"
|
||||
else
|
||||
noun="error"
|
||||
if (( fatal )); then
|
||||
action="die"
|
||||
fi
|
||||
fi
|
||||
# Convey warnings/errors so that they can be reseen upon emerge exiting.
|
||||
if [[ ${stderr} ]]; then
|
||||
ewarn "locale-gen(8) issued the following ${noun}s:"
|
||||
while read -r; do
|
||||
ewarn "$REPLY"
|
||||
done <<<"${stderr}"
|
||||
fi
|
||||
if (( ret != 0 )); then
|
||||
"${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
}
|
||||
|
||||
glibc_do_src_install() {
|
||||
@ -1568,8 +1589,8 @@ glibc_do_src_install() {
|
||||
rm -f "${ED}"/etc/localtime
|
||||
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if use compile-locales && ! is_crosscompile; then
|
||||
run_locale_gen 1 "${ED}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1719,8 +1740,8 @@ pkg_postinst() {
|
||||
# window for the affected programs.
|
||||
use loong && glibc_refresh_ldconfig
|
||||
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if ! use compile-locales; then
|
||||
run_locale_gen 0 "${EROOT}"
|
||||
fi
|
||||
|
||||
# If fixincludes was/is active for a particular GCC slot, we
|
||||
|
@ -1324,7 +1324,8 @@ src_test() {
|
||||
# src_install
|
||||
|
||||
run_locale_gen() {
|
||||
local prefix=$1 user_config config
|
||||
local fatal=$1 prefix=$2
|
||||
local user_config action config stderr noun ret
|
||||
local -a hasversion_opts localegen_args
|
||||
|
||||
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
|
||||
@ -1353,7 +1354,27 @@ run_locale_gen() {
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
locale-gen "${localegen_args[@]}"
|
||||
{ stderr=$(locale-gen "${localegen_args[@]}" 2>&1 >&3); } 3>&1
|
||||
ret=$?
|
||||
action="ewarn"
|
||||
if (( ret == 0 )); then
|
||||
noun="warning"
|
||||
else
|
||||
noun="error"
|
||||
if (( fatal )); then
|
||||
action="die"
|
||||
fi
|
||||
fi
|
||||
# Convey warnings/errors so that they can be reseen upon emerge exiting.
|
||||
if [[ ${stderr} ]]; then
|
||||
ewarn "locale-gen(8) issued the following ${noun}s:"
|
||||
while read -r; do
|
||||
ewarn "$REPLY"
|
||||
done <<<"${stderr}"
|
||||
fi
|
||||
if (( ret != 0 )); then
|
||||
"${action}" "locale-gen(8) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
fi
|
||||
}
|
||||
|
||||
glibc_do_src_install() {
|
||||
@ -1568,8 +1589,8 @@ glibc_do_src_install() {
|
||||
rm -f "${ED}"/etc/localtime
|
||||
|
||||
# Generate all locales if this is a native build as locale generation
|
||||
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
|
||||
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if use compile-locales && ! is_crosscompile; then
|
||||
run_locale_gen 1 "${ED}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1719,8 +1740,8 @@ pkg_postinst() {
|
||||
# window for the affected programs.
|
||||
use loong && glibc_refresh_ldconfig
|
||||
|
||||
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
|
||||
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
|
||||
if ! use compile-locales; then
|
||||
run_locale_gen 0 "${EROOT}"
|
||||
fi
|
||||
|
||||
# If fixincludes was/is active for a particular GCC slot, we
|
||||
|
Loading…
x
Reference in New Issue
Block a user