Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217906 - media-tv/gentoo-vdr-scripts-0.4.3: No charmap when using baselayout-2
Summary: media-tv/gentoo-vdr-scripts-0.4.3: No charmap when using baselayout-2
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo VDR Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-16 07:09 UTC by Robert Schedel
Modified: 2009-03-10 17:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Schedel 2008-04-16 07:09:44 UTC
On startup with the new baselayout-2, vdr does not find the LANG variable and vdr is set to english language on startup. However, LANG is set in /etc/conf.d/vdr as well as in /etc/env.d/02locale. Log from startup:

[...]
acpid             | * Starting acpid ...
gpm               | * Starting gpm ...
fcron             | * Starting fcron ...                                  [ ok ]
vdr               | * Preparing start of vdr:
hald              | * Starting Hardware Abstraction Layer daemon ...      [ ok ]
vdr               | *   config files ...                                  [ ok ]
vdr               | * You have not set a charmap! (LANG in /etc/env.d/02locale or /etc/conf.d/vdr)
vdr               | * Automatically using locale en_US.utf8 to get most of vdr utf8 support.                                                              [ ok ]
vdr               | *   Waiting for prerequisits (devices nodes etc.) ... [ ok ]
vdr               | * Starting vdr ...                                    [ ok ]
vdr               | *   Waiting for working vdr ...                       [ ok ]
vdr               | * Starting vdr watchdog ...                           [ ok ]
local             | * Starting local ...
[...]

Reproducible: Always

Steps to Reproduce:
1. Install vdr (media-tv/vdr-1.6.0-r2 with media-tv/gentoo-vdr-scripts-0.4.3, etc.) and baselayout-2 (sys-apps/baselayout-2.0.0, sys-apps/openrc-0.2.1-r2)
2. Reboot and watch vdr log output

Actual Results:  
vdr reverts to internal default LANG setting

Expected Results:  
vdr should use LANG settings from /etc/env.d/02locale or /etc/conf.d/vdr on startup

Content of /etc/env.d/02locale:
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
GDM_LANG="de_DE.utf8"

Content of /etv/conf.d/vdr:
[...]
VDR_SORT_ORDER="de_DE"
LANG="de_DE.utf8"
[...]

Component versions:
- media-tv/vdr-1.6.0-r2
- media-tv/gentoo-vdr-scripts-0.4.3
- sys-apps/baselayout-2.0.0
- sys-apps/openrc-0.2.1-r2

Some additional observations:
1. With old baselayout-1 this did not happen.
2. Changelog for gentoo-vdr-scripts-0.4.3 states: "Should now also work with baselayout-2/openrc."
2. A workaround seems to be using "export LANG=..." in /etc/conf.d/vdr. The templates do not have the "export" in them (unclear if this is the desired final solution because actually also the setting from 02locale should be used).
3. When root restarts vdr manually from his bash login shell, the error also does not occur anymore with baselayout-2. Log from manual restart:

# /etc/init.d/vdr restart
vdr               | * Stopping vdr watchdog ...                           [ ok ]
vdr               | * Stopping vdr ...                                    [ ok ]
vdr               | * Preparing start of vdr:
vdr               | *   config files ...                                  [ ok ]
vdr               | *   Waiting for prerequisits (devices nodes etc.) ... [ ok ]
vdr               | * Starting vdr ...                                    [ ok ]
vdr               | *   Waiting for working vdr ...                       [ ok ]
vdr               | * Starting vdr watchdog ...
Comment 1 Robert Schedel 2008-04-16 14:30:05 UTC
(In reply to comment #0)
> 2. A workaround seems to be using "export LANG=..." in /etc/conf.d/vdr. The
> templates do not have the "export" in them (unclear if this is the desired
> final solution because actually also the setting from 02locale should be used).

Just noticed, this is not even a workaround: Only the error message on startup is gone for some mysterious reason, but the messages are still in english afterwards. Only after restarting manually (/etc/init.d/vdr restart), the messages are also displayed according to LANG localization.
Comment 2 Matthias Schwarzott gentoo-dev 2008-04-19 13:01:29 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > 2. A workaround seems to be using "export LANG=..." in /etc/conf.d/vdr. The
> > templates do not have the "export" in them (unclear if this is the desired
> > final solution because actually also the setting from 02locale should be used).
> 
> Just noticed, this is not even a workaround: Only the error message on startup
> is gone for some mysterious reason, but the messages are still in english
> afterwards. Only after restarting manually (/etc/init.d/vdr restart), the
> messages are also displayed according to LANG localization.
> 

So I noticed the charmap checking code has a bug. (This is already fixed in svn-repository, and will be in next gentoo-vdr-scripts version)
It did this:

check output of "locale charmap"
then do export LANG.

So locale command did not receive value of $LANG.
Language VDR uses in OSD is not only influenced by $LANG, but also by setting in /etc/vdr/setup.conf that can be modified via OSD itself.
# grep OSDLanguage /etc/vdr/setup.conf
Comment 3 Matthias Schwarzott gentoo-dev 2008-04-19 13:07:14 UTC
(In reply to comment #0)
> On startup with the new baselayout-2, vdr does not find the LANG variable and
> vdr is set to english language on startup. However, LANG is set in
> /etc/conf.d/vdr as well as in /etc/env.d/02locale. Log from startup:
> 
> Expected Results:  
> vdr should use LANG settings from /etc/env.d/02locale or /etc/conf.d/vdr on
> startup
> 
> Content of /etc/env.d/02locale:
> LANG="de_DE.utf8"
> LC_ALL="de_DE.utf8"
> GDM_LANG="de_DE.utf8"
> 
Not respecting this in an init-script seems to be a baselayout/openrc issue.
No idea how sourcing /etc/profile is (thought to be) handled in openrc.

> Content of /etv/conf.d/vdr:
> [...]
> VDR_SORT_ORDER="de_DE"
> LANG="de_DE.utf8"
> [...]
> 
LANG from here IS used, but there was a bug - see Comment #2.
export LANG really is a workaround.

> 
> Some additional observations:
> 1. With old baselayout-1 this did not happen.
Seems it sourced /etc/profile

> 2. Changelog for gentoo-vdr-scripts-0.4.3 states: "Should now also work with
> baselayout-2/openrc."
It does for all other stuff. Even using non bash shell.

> 2. A workaround seems to be using "export LANG=..." in /etc/conf.d/vdr. The
> templates do not have the "export" in them (unclear if this is the desired
> final solution because actually also the setting from 02locale should be used).
Works as seen above.

> 3. When root restarts vdr manually from his bash login shell, the error also
> does not occur anymore with baselayout-2. Log from manual restart:

Works, as login shell has LANG from /etc/profile in environment and init-script inherits it then.
Comment 4 Matthias Schwarzott gentoo-dev 2008-04-21 17:59:23 UTC
The situation should be improved with gentoo-vdr-scripts-0.4.4
Comment 5 Robert Schedel 2008-04-21 21:37:16 UTC
(In reply to comment #4)
> The situation should be improved with gentoo-vdr-scripts-0.4.4
> 

Situation is improved with this version. No error message anymore on startup (but menu still in english until manual restart from login shell, as explained above). Part from /etc/vdr/setup.conf:
OSDLanguage = de_DE

Comment 6 Matthias Schwarzott gentoo-dev 2008-07-28 21:12:47 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > The situation should be improved with gentoo-vdr-scripts-0.4.4
> > 
> 
> Situation is improved with this version. No error message anymore on startup
> (but menu still in english until manual restart from login shell, as explained
> above). Part from /etc/vdr/setup.conf:
> OSDLanguage = de_DE
> 
Coming back to this bug.
I think it really is a bug deep inside vdr's handling of locales / enumeration of them and thinking they exist - if locales do not exist you cannot select and use them.

So one workaround is: Set LANG in /etc/conf.d/vdr and delete the OSDLanguage from setup.conf
Comment 7 Matthias Schwarzott gentoo-dev 2009-03-10 17:51:47 UTC
Re-reading all this bug makes me think we cannot do anything on this without changing vdr itself.

So closing to CANTFIX.