Gentoo Archives: gentoo-commits

From: "Matthias Schwarzott (zzam)" <zzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-vdr r589 - in gentoo-vdr-scripts/trunk: . usr/share/vdr/rcscript
Date: Sat, 19 Apr 2008 12:55:57
Message-Id: E1JnCbi-0006sa-BC@stork.gentoo.org
1 Author: zzam
2 Date: 2008-04-19 12:55:53 +0000 (Sat, 19 Apr 2008)
3 New Revision: 589
4
5 Modified:
6 gentoo-vdr-scripts/trunk/ChangeLog
7 gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh
8 Log:
9 Make charmap handling more verbose and fix some export/usage order. Bug #217906
10
11 Modified: gentoo-vdr-scripts/trunk/ChangeLog
12 ===================================================================
13 --- gentoo-vdr-scripts/trunk/ChangeLog 2008-04-19 10:58:13 UTC (rev 588)
14 +++ gentoo-vdr-scripts/trunk/ChangeLog 2008-04-19 12:55:53 UTC (rev 589)
15 @@ -2,6 +2,11 @@
16 # $Id$
17
18 19 Apr 2008; Matthias Schwarzott <zzam@g.o>
19 + usr/share/vdr/rcscript/pre-start-45-utf8-check.sh:
20 + Make charmap handling more verbose and fix some export/usage order. Bug
21 + #217906
22 +
23 + 19 Apr 2008; Matthias Schwarzott <zzam@g.o>
24 usr/share/vdr/rcscript/post-start-60-check-syslog-errors.sh:
25 Print name of log-file in every case when errors are detected.
26
27
28 Modified: gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh
29 ===================================================================
30 --- gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh 2008-04-19 10:58:13 UTC (rev 588)
31 +++ gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh 2008-04-19 12:55:53 UTC (rev 589)
32 @@ -20,22 +20,27 @@
33 addon_main() {
34 if [ -n "${CAP_UTF8}" ]; then
35 # vdr supports utf8 :)
36 - local charmap=$(locale charmap)
37 - local l
38
39 - # export LANG if it is set
40 + # export LANG if it is set (before calling locale, Bug #217906)
41 [ -n "${LANG}" ] && export LANG
42
43 + local charmap=$(locale charmap)
44 +
45 if [ "${charmap}" = "ANSI_X3.4-1968" ]; then
46 # User has not set any locale stuff
47
48 - ewarn "You have not set a charmap! (LANG in /etc/env.d/02locale or /etc/conf.d/vdr)"
49 + ewarn "Your local charmap is ANSI_X3.4-1968."
50 + if [ -n "${LANG}" ]; then
51 + ewarn "It seems the locale you chose does not exist on your system [LANG=${LANG}]"
52 + ewarn "Please have a look at /etc/locale.gen"
53 + else
54 + ewarn "You have not set a charmap! (LANG in /etc/env.d/02locale or /etc/conf.d/vdr)"
55 + fi
56
57 -
58 # Lets guess
59
60 - # try an english utf8 locale
61 - l="$(locale -a|grep utf8|grep ^en|head -n 1)"
62 + # try an english utf8 locale first
63 + local l="$(locale -a|grep utf8|grep ^en|head -n 1)"
64
65 if [ "${l}" = "" ]; then
66 # none found
67 @@ -46,6 +51,8 @@
68 if [ "${l}" != "" ]; then
69 export LANG="${l}"
70 ewarn "Automatically using locale ${l} to get most of vdr utf8 support."
71 + else
72 + ewarn "Not found any utf8 locale, you will have problems with chars extending ASCII"
73 fi
74
75 fi
76
77 --
78 gentoo-commits@l.g.o mailing list