1 |
vapier 15/08/29 23:05:43 |
2 |
|
3 |
Modified: locale-gen |
4 |
Log: |
5 |
drop support for /etc/locales.build |
6 |
|
7 |
Revision Changes Path |
8 |
1.39 src/patchsets/glibc/extra/locale/locale-gen |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/extra/locale/locale-gen?rev=1.39&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/extra/locale/locale-gen?rev=1.39&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/extra/locale/locale-gen?r1=1.38&r2=1.39 |
13 |
|
14 |
Index: locale-gen |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/extra/locale/locale-gen,v |
17 |
retrieving revision 1.38 |
18 |
retrieving revision 1.39 |
19 |
diff -u -r1.38 -r1.39 |
20 |
--- locale-gen 29 Aug 2015 04:44:58 -0000 1.38 |
21 |
+++ locale-gen 29 Aug 2015 23:05:43 -0000 1.39 |
22 |
@@ -52,7 +52,7 @@ |
23 |
} |
24 |
show_version() { |
25 |
local b="(" a=")" |
26 |
- local cvsver="$Revision: 1.38 $b $Date: 2015/08/29 04:44:58 $a" |
27 |
+ local cvsver="$Revision: 1.39 $b $Date: 2015/08/29 23:05:43 $a" |
28 |
echo "locale-gen-${cvsver//: }" |
29 |
exit 0 |
30 |
} |
31 |
@@ -168,15 +168,7 @@ |
32 |
exit 1 |
33 |
fi |
34 |
|
35 |
- |
36 |
- |
37 |
-if [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] && \ |
38 |
- [[ -e ${EROOT}etc/locales.build ]] |
39 |
-then |
40 |
- ewarn "You should upgrade your /etc/locales.build to /etc/locale.gen" |
41 |
- ewarn "and then remove /etc/locales.build when you're done.\n" |
42 |
-fi |
43 |
- |
44 |
+# Only generate locales the user specified before falling back to the config. |
45 |
locales_to_generate=${GENERATE} |
46 |
|
47 |
if [[ -z ${locales_to_generate} ]] && [[ -e ${CONFIG} ]] ; then |
48 |
@@ -197,47 +189,9 @@ |
49 |
fi |
50 |
|
51 |
if [[ -z ${locales_to_generate} ]] ; then |
52 |
- # |
53 |
- # NOTE: begin retarded situation |
54 |
- # if user does not have locale.gen setup, but they have a |
55 |
- # locales.build, and they have USE=-userlocales, then they |
56 |
- # probably have the default locales.build file. the problem |
57 |
- # with this is the default locales.build had a bunch of |
58 |
- # uncommented locales, so the resulting system will end up |
59 |
- # with only a few locales and the user will be left wondering |
60 |
- # wtf just happened. so our hack logic here is: |
61 |
- # - if we are outside of ebuild (i.e. user ran us) then go for it |
62 |
- # - if we are inside of ebuild and USE=-userlocales, then just bail |
63 |
- # |
64 |
- |
65 |
- # if these vars are set we just assume in ebuild |
66 |
- if [[ ${PN} == "glibc" && -n ${FILESDIR} && -n ${D} ]] ; then |
67 |
- has() { [[ " ${*:2} " == *" $1 "* ]] ; } |
68 |
- ! has userlocales ${USE} && CONFIG="" |
69 |
- fi |
70 |
- |
71 |
- if [[ ${CONFIG} == */etc/locale.gen ]] ; then |
72 |
- CONFIG=${CONFIG/%locale.gen/locales.build} |
73 |
- if [[ -e ${CONFIG} ]] ; then |
74 |
- locales_to_generate=$(sed \ |
75 |
- -e 's:#.*::' \ |
76 |
- -e '/^[[:space:]]*$/d' \ |
77 |
- -e 's:/: :g' \ |
78 |
- "${CONFIG}") |
79 |
- fi |
80 |
- if [[ -n ${locales_to_generate} ]] && \ |
81 |
- [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] |
82 |
- then |
83 |
- ewarn "Automatically importing locales from /etc/locales.build ..." |
84 |
- ewarn "You really should do this yourself ...\n" |
85 |
- fi |
86 |
- fi |
87 |
- |
88 |
- if [[ -z ${locales_to_generate} ]] ; then |
89 |
- [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] && \ |
90 |
- ewarn "No locales found" |
91 |
- exit 0 |
92 |
- fi |
93 |
+ [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] && \ |
94 |
+ ewarn "No locales found" |
95 |
+ exit 0 |
96 |
fi |
97 |
|
98 |
mkdir -p "${LOCALEDIR}" |