diff options
author | vapier <vapier> | 2015-08-29 23:05:43 +0000 |
---|---|---|
committer | vapier <vapier> | 2015-08-29 23:05:43 +0000 |
commit | 481c032ec6714d2e7ff4b6d807c9c872496fd4f0 (patch) | |
tree | 54bc9f8c94b7f3d82d5852a0934b5b1def110f90 | |
parent | locale-gen: detect non-unique locale names #235555 (diff) | |
download | locale-gen-481c032ec6714d2e7ff4b6d807c9c872496fd4f0.tar.gz locale-gen-481c032ec6714d2e7ff4b6d807c9c872496fd4f0.tar.bz2 locale-gen-481c032ec6714d2e7ff4b6d807c9c872496fd4f0.zip |
drop support for /etc/locales.build
-rwxr-xr-x | locale-gen | 56 |
1 files changed, 5 insertions, 51 deletions
@@ -52,7 +52,7 @@ show_usage() { } show_version() { local b="(" a=")" - local cvsver="$Revision: 1.38 $b $Date: 2015/08/29 04:44:58 $a" + local cvsver="$Revision: 1.39 $b $Date: 2015/08/29 23:05:43 $a" echo "locale-gen-${cvsver//: }" exit 0 } @@ -168,15 +168,7 @@ if [[ $? -ne 0 ]] || [[ -z ${LOCALEDIR} ]] || [[ ${LOCALEDIR} != ${DESTDIR}/usr/ exit 1 fi - - -if [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] && \ - [[ -e ${EROOT}etc/locales.build ]] -then - ewarn "You should upgrade your /etc/locales.build to /etc/locale.gen" - ewarn "and then remove /etc/locales.build when you're done.\n" -fi - +# Only generate locales the user specified before falling back to the config. locales_to_generate=${GENERATE} if [[ -z ${locales_to_generate} ]] && [[ -e ${CONFIG} ]] ; then @@ -197,47 +189,9 @@ if [[ -z ${locales_to_generate} ]] && [[ -e ${CONFIG} ]] ; then fi if [[ -z ${locales_to_generate} ]] ; then - # - # NOTE: begin retarded situation - # if user does not have locale.gen setup, but they have a - # locales.build, and they have USE=-userlocales, then they - # probably have the default locales.build file. the problem - # with this is the default locales.build had a bunch of - # uncommented locales, so the resulting system will end up - # with only a few locales and the user will be left wondering - # wtf just happened. so our hack logic here is: - # - if we are outside of ebuild (i.e. user ran us) then go for it - # - if we are inside of ebuild and USE=-userlocales, then just bail - # - - # if these vars are set we just assume in ebuild - if [[ ${PN} == "glibc" && -n ${FILESDIR} && -n ${D} ]] ; then - has() { [[ " ${*:2} " == *" $1 "* ]] ; } - ! has userlocales ${USE} && CONFIG="" - fi - - if [[ ${CONFIG} == */etc/locale.gen ]] ; then - CONFIG=${CONFIG/%locale.gen/locales.build} - if [[ -e ${CONFIG} ]] ; then - locales_to_generate=$(sed \ - -e 's:#.*::' \ - -e '/^[[:space:]]*$/d' \ - -e 's:/: :g' \ - "${CONFIG}") - fi - if [[ -n ${locales_to_generate} ]] && \ - [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] - then - ewarn "Automatically importing locales from /etc/locales.build ..." - ewarn "You really should do this yourself ...\n" - fi - fi - - if [[ -z ${locales_to_generate} ]] ; then - [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] && \ - ewarn "No locales found" - exit 0 - fi + [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] && \ + ewarn "No locales found" + exit 0 fi mkdir -p "${LOCALEDIR}" |