Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 287099 Details for
Bug 146882
sys-libs/glibc locale generation should be done in src_*() instead of pkg_postinst()
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
glibc compile locales patch
glibc-compile-locales.patch (text/plain), 4.59 KB, created by
SpanKY
on 2011-09-20 01:54:44 UTC
(
hide
)
Description:
glibc compile locales patch
Filename:
MIME Type:
Creator:
SpanKY
Created:
2011-09-20 01:54:44 UTC
Size:
4.59 KB
patch
obsolete
>Index: glibc-2.14.ebuild >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.14.ebuild,v >retrieving revision 1.9 >diff -u -p -r1.9 glibc-2.14.ebuild >--- glibc-2.14.ebuild 1 Sep 2011 05:09:07 -0000 1.9 >+++ glibc-2.14.ebuild 20 Sep 2011 01:54:10 -0000 >@@ -39,7 +39,7 @@ LT_VER="" > NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires > #LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires > >-IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}" >+IUSE="compile-locales debug gd glibc-omitfp hardened multilib nls profile selinux vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}" > [[ -n ${RELEASE_VER} ]] && S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} > > # Here's how the cross-compile logic breaks down ... >Index: metadata.xml >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/metadata.xml,v >retrieving revision 1.6 >diff -u -p -r1.6 metadata.xml >--- metadata.xml 3 Sep 2011 09:11:04 -0000 1.6 >+++ metadata.xml 20 Sep 2011 01:54:10 -0000 >@@ -3,8 +3,11 @@ > <pkgmetadata> > <herd>toolchain</herd> > <use> >- <flag name='glibc-omitfp'>Configure glibc with --enable-omitfp which lets >- the build system determine when it is safe to use >+ <flag name='compile-locales'>build *all* locales in src_install; this >+ is generally meant for stage building only as it ignores the user's >+ /etc/locale.gen file and can be pretty slow</flag> >+ <flag name='glibc-omitfp'>Configure glibc with --enable-omitfp which >+ lets the build system determine when it is safe to use > -fomit-frame-pointer</flag> > </use> > </pkgmetadata> >Index: files/eblits/common.eblit >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v >retrieving revision 1.22 >diff -u -p -r1.22 common.eblit >--- files/eblits/common.eblit 19 Aug 2011 23:03:11 -0000 1.22 >+++ files/eblits/common.eblit 20 Sep 2011 01:54:10 -0000 >@@ -287,6 +287,20 @@ setup_env() { > export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}" > } > >+run_locale_gen() { >+ # if the host locales.gen contains no entries, we'll install everything >+ local root="$1" >+ 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}" >+} >+ > just_headers() { > is_crosscompile && use crosscompile_opts_headers-only > } >Index: files/eblits/pkg_postinst.eblit >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_postinst.eblit,v >retrieving revision 1.1 >diff -u -p -r1.1 pkg_postinst.eblit >--- files/eblits/pkg_postinst.eblit 1 Mar 2009 21:06:22 -0000 1.1 >+++ files/eblits/pkg_postinst.eblit 20 Sep 2011 01:54:10 -0000 >@@ -16,14 +16,6 @@ eblit-glibc-pkg_postinst() { > # 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}" >+ use compile-locales || run_locale_gen "${ROOT}" > fi > } >Index: files/eblits/src_install.eblit >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v >retrieving revision 1.15 >diff -u -p -r1.15 src_install.eblit >--- files/eblits/src_install.eblit 8 Jul 2011 15:38:29 -0000 1.15 >+++ files/eblits/src_install.eblit 20 Sep 2011 01:54:10 -0000 >@@ -170,6 +170,11 @@ toolchain-glibc_src_install() { > # Prevent overwriting of the /etc/localtime symlink. We'll handle the > # creation of the "factory" symlink in pkg_postinst(). > rm -f "${D}"/etc/localtime >+ >+ # Generate all locales if this is a native build as locale generation >+ if use compile-locales && ! is_crosscompile ; then >+ run_locale_gen "${D}" >+ fi > } > > toolchain-glibc_headers_install() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 146882
:
108463
|
257908
| 287099