Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147062 - upgrading to 2006.1 profile could hose console fonts
Summary: upgrading to 2006.1 profile could hose console fonts
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: New Documentation (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: nm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 145731
  Show dependency tree
 
Reported: 2006-09-10 06:30 UTC by Peter Hyman
Modified: 2007-01-10 07:33 UTC (History)
3 users (show)

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


Attachments
gentoo-upgrading.diff (gentoo-upgrading-en.diff,10.01 KB, patch)
2006-09-10 08:53 UTC, Dimitry Bradt (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Hyman 2006-09-10 06:30:53 UTC
see bug #146990 for some color.
When I upgraded to this profile, many applications needed recompiling due to the unicode use flag. Unfortunately for me, I never had any LANG or LC_? environment variables set. This was the case since my 2004.3 installation. After upgrading to 2006.1, certain programs that rely on graphical characters, such as mc-4.6.1 would not draw properly to the console. After some help from Jakub and Jerry McBride on the -users mail list, it appears that some changes to /conf.d/consolefont and rc.conf needed to be made -- ALONG with setting up an /env.d/02locale file (which did not exist for me).

As a suggestion for others who may upgrade to this profile, a note should be added to make sure that LANG and LC_? are properly set and to see the Gentoo documentation on setting up locales. Quick referral to that doc, http://www.gentoo.org/doc/en/guide-localization.xml, will hopefully save others who took for granted that locales did not need checking some time.

Not sure if this falls under the "New Documentation" category, but it should exist somewhere in the 2006.1 profile directory -- perhaps as a README?
Comment 1 Dimitry Bradt (RETIRED) gentoo-dev 2006-09-10 06:37:31 UTC
it would fit in the gentoo upgrading guide.
I'll make a diff as an update-proposal.

-diox
Comment 2 Dimitry Bradt (RETIRED) gentoo-dev 2006-09-10 08:53:03 UTC
Created attachment 96595 [details, diff]
gentoo-upgrading.diff

gentoo-upgrading.diff

Added this information as a small note under the 2006.1 notes. Also made the doc completely valid. Didn't bump the version tough;

-diox
Comment 3 Xavier Neys (RETIRED) gentoo-dev 2006-09-10 13:48:51 UTC
There's no relation between the new profile and the so-called requirement to define a locale.
As far as mc is concerned, it works fine without any locale.
I noticed the missing border chars on another box that's still using the 2006.0 profile.
The only way I can reproduce what you describe in bug #146990 is when UNICODE is set to YES in /etc/rc.conf *and* no locale is defined, which could be considered a user's error.
It's not related to the 2006.1 profile and telling all our users that they need to define a locale when upgrading is simply wrong.

Our utf-8.xml should mention that when switching UNICODE to YES, a locale must also be defined.
Comment 4 Xavier Neys (RETIRED) gentoo-dev 2006-09-10 13:48:58 UTC
Comment on attachment 96595 [details, diff]
gentoo-upgrading.diff

a 266 line long patch to add a 4 line long note?
Comment 5 nm (RETIRED) gentoo-dev 2006-09-10 13:53:50 UTC
(In reply to comment #3)
Well, the fact that the unicode USE flag is now on by default can mean trouble down the road. I'm writing a brief <impo> for it now that better describes what happens and suggests the user visit utf8.xml and guide-localization.xml.
Comment 6 Xavier Neys (RETIRED) gentoo-dev 2006-09-10 13:56:25 UTC
Got nothing to do with the unicode USE flag, as clearly stated reporter's bug.

The only place we mention setting UNICODE="YES" is in utf-8.xml where users have been told to define a locale in the previous chapter.
gentoo-upgrading.xml does not need any extra note.
Comment 7 Xavier Neys (RETIRED) gentoo-dev 2006-09-10 14:01:45 UTC
Now that I think of it, doesn't the unicode USE flag on baselayout switch UNICODE to YES in rc.conf automagicevily?
Comment 8 Xavier Neys (RETIRED) gentoo-dev 2006-09-10 14:03:47 UTC
/usr/portage/sys-apps/baselayout/baselayout-1.12.4-r7.ebuild:
"""
    # Setup unicode defaults for silly unicode users
    if use unicode ; then
        sed -i -e '/^UNICODE=/s:no:yes:' etc/rc.conf
    fi
"""

he he, silly baselayout coders!
Comment 9 Dimitry Bradt (RETIRED) gentoo-dev 2006-09-10 14:58:09 UTC
i tought of adding a proposal (as i said in comment 1);
and neysx; the doc is all valid with that patch (removed trailing whitespaces/fixed too long sentences) -> that's why it is that long.

-diox
Comment 10 nm (RETIRED) gentoo-dev 2006-09-10 15:23:40 UTC
(In reply to comment #8)
> /usr/portage/sys-apps/baselayout/baselayout-1.12.4-r7.ebuild:
> """
>     # Setup unicode defaults for silly unicode users
>     if use unicode ; then
>         sed -i -e '/^UNICODE=/s:no:yes:' etc/rc.conf
>     fi
> """
> 
> he he, silly baselayout coders!

So . . .just mark this as RESO WONTFIX then, or what needs to be changed? You're right about gentoo-upgrading; no need to mention this stuff, so I abandoned my patch.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-09-10 15:36:55 UTC
This has nothing to w/ the profiles at all. If you've got USE="unicode", you'll get UNICODE="yes". Nothing wrong with that. If you don't want unicode, then remove unicode from your use flags. If you don't have locale set, then it's pretty much PEBKAC, you'll get POSIX that doesn't play well w/ unicode, obviously. :)

Comment 12 nm (RETIRED) gentoo-dev 2006-09-10 16:17:19 UTC
Yeah . . . what the other guys said. User error has nothing to do with profiles, and it looks like baselayout is smart enough to take care of the other UNICODE settings for you. You should have already had some sort of locale defined, anyway. Closing.
Comment 13 Xavier Neys (RETIRED) gentoo-dev 2006-09-17 14:44:21 UTC
(In reply to comment #11)
> This has nothing to w/ the profiles at all.

Looks like reading 10 comments in sequence can be quite challenging.

User's only mistake was to allow Gentoo's default values and
1) Gentoo's default values do not work
2) problem & solution are not explained anywhere

The scenario is:
1. User has never defined any locale because he does not need one
2. User follows doc to switch to the 2006.1 profile
3. User upgrades baselayout later on
4. User allows Gentoo's default values
5. User wonders why his console apps do not work anymore

Solution: use -unicode for baselayout or globally, or define a unicode locale
FYI, mc looks better in a text console when not using unicode


Roy, could you add a line in the comments above the UNICODE var in /etc/rc.conf to mention that a unicode locale has to be defined when UNICODE="yes"?
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-09-17 14:50:17 UTC
(In reply to comment #13)
> Roy, could you add a line in the comments above the UNICODE var in /etc/rc.conf
> to mention that a unicode locale has to be defined when UNICODE="yes"?

Uh, kinda obvious? o_O


Comment 15 nm (RETIRED) gentoo-dev 2006-09-17 23:38:38 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > Roy, could you add a line in the comments above the UNICODE var in /etc/rc.conf
> > to mention that a unicode locale has to be defined when UNICODE="yes"?
> 
> Uh, kinda obvious? o_O
> 

I agree; this seems really obvious -- even to a user who hasn't ever set any locales thus far.

If there is any *documentation* change to be made (in addition to the proposed baselayout comment), what should it be? Perhaps a note that "if you select one of the 2006.1 profiles, be sure to set up a unicode locale" --> and reference the relevant doc?

Back to docs team.
Comment 16 Jan Kundrát (RETIRED) gentoo-dev 2006-09-18 02:12:11 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > Roy, could you add a line in the comments above the UNICODE var in /etc/rc.conf
> > to mention that a unicode locale has to be defined when UNICODE="yes"?
> 
> Uh, kinda obvious? o_O

Apparently not. /me votes for a note.

Comment 17 nm (RETIRED) gentoo-dev 2006-10-06 12:07:23 UTC
(In reply to comment #16)
Okay, so is any documentation change necessary, or has the comment been added to baselayout already?
Comment 18 nm (RETIRED) gentoo-dev 2007-01-10 07:07:50 UTC
*snaps*

That's it, I can't stand seeing this bug remain open any longer. I'll fix it and commit it shortly, based on neysx's most recent comments, now that we have the solution. UberLord, you're free to do whatever you want to rc.conf, but a note in tandem with the note I'll add to the guide would be most beneficial to the users.

:)
Comment 19 nm (RETIRED) gentoo-dev 2007-01-10 07:33:03 UTC
(In reply to comment #3)
Though the user is already walked through the process of defining a Unicode locale before we get to the UNICODE="yes" stage, I went ahead and added a note just before that to make sure they didn't skip that step. Now they know that they do have to do it, for sure, to avoid problems.

(In reply to comment #13)
As per your suggestions and summary, I added the solutions of either creating a unicode locale as per our guide (with link), or by emerging baselayout with the -unicode USE flag, and by turning it off in rc.conf.

All fixed in CVS. Sorry this rotted so long in bugzie.