Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44209 - openoffice-ximian fails when LANGUAGE set in profile.env
Summary: openoffice-ximian fails when LANGUAGE set in profile.env
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
: 46090 (view as bug list)
Depends on: 51095
Blocks:
  Show dependency tree
 
Reported: 2004-03-09 20:32 UTC by Ed Catmur
Modified: 2005-01-22 08:05 UTC (History)
2 users (show)

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


Attachments
Revised ebuild (openoffice-ximian-1.1.51.ebuild,14.72 KB, text/plain)
2004-03-09 20:40 UTC, Ed Catmur
Details
openoffice-ximian-1.1.52.ebuild (openoffice-ximian-1.1.52.ebuild,14.92 KB, text/plain)
2004-04-06 17:05 UTC, Ed Catmur
Details
openoffice-ximian-1.1.52.ebuild (openoffice-ximian-1.1.52.ebuild,14.80 KB, text/plain)
2004-04-07 03:01 UTC, Ed Catmur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2004-03-09 20:32:56 UTC
I have in /etc/profile.env export LANGUAGE='en_GB.utf8' (from /etc/env.d/*)

This causes emerge openoffice-ximian to fail with
 * Unknown LANGUAGE setting!
 *
 * Known LANGUAGE settings are: ...

This cannot be overridden in the environment or in /etc/make.conf as the /etc/profile.env setting takes priority. I need this profile.env setting and will not remove or alter it for the duration of the ebuild.

Up till now I have worked around this by editing the ebuild into my overlay. This is not sustainable. Searching forums indicates that international users have been forced to resort to similar or worse hacks: http://forums.gentoo.org/viewtopic.php?t=142525

It is my opinion that the openoffice-ximian ebuild use of LANGUAGE to set localisation is not defensible when the accepted values are so restrictive and idiosyncratic. If LANGUAGE is to be used, at the very least all $(locale -a) settings corresponding to an openoffice-ximian localised language should be accepted. (As a en_GB user, I would prefer a more general matching style.) Alternatively, a different environment variable should be used that does not have meaning outside the context of the ebuild and so can be set in /etc/make.conf without fear of side effects.

I present the latter solution in a revised ebuild, using the variable OO_LANGUAGE to override LANGUAGE.
Comment 1 Ed Catmur 2004-03-09 20:40:12 UTC
Created attachment 27132 [details]
Revised ebuild

Proposed changes reproduced below for convenience.

---
/srv/gentoo/trees/rsync.gentoo.org/app-office/openoffice-ximian/openoffice-ximian-1.1.51.ebuild
    2004-03-10 04:01:06.125774464 +0000
+++
/srv/gentoo/trees/capella.catmur.co.uk/app-office/openoffice-ximian/openoffice-ximian-1.1.51.ebuild
2004-03-10 04:15:31.940150672 +0000
@@ -116,6 +116,9 @@
	if [ -z "$LANGUAGE" ]; then
		LANGUAGE=01
	fi
+	if [ "$OO_LANGUAGE" ]; then
+		LANGUAGE=$OO_LANGUAGE
+	fi
  
	case "$LANGUAGE" in
		01 | ENUS ) LANGNO=01; LANGNAME=ENUS; LFULLNAME="US English
(default)"
@@ -173,12 +176,15 @@
		97 | HEBREW ) LANGNO=97; LANGNAME=HEBREW; LFULLNAME=Hebrew
			;;
		* )
-			eerror "Unknown LANGUAGE setting!"
+			eerror "Unknown LANGUAGE setting: '$LANGUAGE'!"
			eerror
			eerror "Known LANGUAGE settings are:"
			eerror "  ENUS | PORT | RUSS | GREEK | DTCH | FREN |
SPAN | FINN | CAT | ITAL |"
			eerror "  CZECH | SLOVAK | DAN | SWED | POL | GER |
PORTBR | THAI | ESTONIAN |"
			eerror "  JAPN | KOREAN | CHINSIM | CHINTRAD | TURK |
HINDI | ARAB | HEBREW"
+			eerror
+			eerror "You can override LANGUAGE by setting
OO_LANGUAGE=(your LANGUAGE) in the"
+			eerror "environment or in /etc/make.conf".
			die
			;;
	esac
Comment 2 Ed Catmur 2004-04-06 17:05:32 UTC
Created attachment 28816 [details]
openoffice-ximian-1.1.52.ebuild
Comment 3 Ed Catmur 2004-04-07 03:01:24 UTC
Created attachment 28824 [details]
openoffice-ximian-1.1.52.ebuild

Forgot to remove CVS header. Sorry.
Comment 4 Andreas Proschofsky (RETIRED) gentoo-dev 2004-05-07 11:42:25 UTC
*** Bug 46090 has been marked as a duplicate of this bug. ***
Comment 5 Ed Catmur 2004-05-14 14:37:58 UTC
See http://bugs.gentoo.org/show_bug.cgi?id=51061#c3 for a better workaround / general solution to the problem.
Comment 6 Ed Catmur 2004-05-14 15:18:36 UTC
However /etc/profile.env overrides some settings including (in my case) LANGUAGE.

See the linked bug 51095 for the obvious solution.
Comment 7 Andreas Proschofsky (RETIRED) gentoo-dev 2005-01-22 08:05:59 UTC
We are now using LINGUAS, so this problem should be gone