public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* locale -uU in ~/.profile
@ 2014-09-30 18:21 Andrew DeFaria
  2014-09-30 21:14 ` Eric Blake
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew DeFaria @ 2014-09-30 18:21 UTC (permalink / raw)
  To: cygwin

I recently debugged this. I share my home directory from a NetApp filer 
such that I can use it from Cygwin or the various Linux machines at my 
client (largely CentOS). Recently I started seeing:

Adefaria-lt:ssh cm-db-ltest01
locale: invalid option -- 'u'
Try `locale --help' or `locale --usage' for more information.
Cm-db-test01:

Hunting this down I found that I have a ~/.profile now (didn't have one 
before) and contained therein is the following:

# Set user-defined locale
export LANG=$(locale -uU)

Turns out that on CentOS locale doesn't support -uU. Now this .profile 
came from a refreshing of Cygwin. How best to handle this...
-- 
Andrew DeFaria
http://defaria.com


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: locale -uU in ~/.profile
  2014-09-30 18:21 locale -uU in ~/.profile Andrew DeFaria
@ 2014-09-30 21:14 ` Eric Blake
  2014-09-30 22:34   ` Andrew DeFaria
  2014-10-01  7:31   ` Achim Gratz
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Blake @ 2014-09-30 21:14 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

On 09/30/2014 11:53 AM, Andrew DeFaria wrote:
> I recently debugged this. I share my home directory from a NetApp filer
> such that I can use it from Cygwin or the various Linux machines at my
> client (largely CentOS). Recently I started seeing:
> 
> Adefaria-lt:ssh cm-db-ltest01
> locale: invalid option -- 'u'
> Try `locale --help' or `locale --usage' for more information.
> Cm-db-test01:
> 
> Hunting this down I found that I have a ~/.profile now (didn't have one
> before) and contained therein is the following:
> 
> # Set user-defined locale
> export LANG=$(locale -uU)

Sounds like cygwin's base-files should be updated to guard
cygwin-specific .profile contents to only occur when uname says it is
running on cygwin.  I'm sure the maintainer would love patches...

> 
> Turns out that on CentOS locale doesn't support -uU. Now this .profile
> came from a refreshing of Cygwin. How best to handle this...

You can guard that with something as simple as:

case $(uname) in
  CYGWIN*) export LANG=$(locale -uU) ;;
esac

(hmm, the moment you also share the .profile with a Solaris box, you'd
have to use `` instead of $(), but that's another story)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: locale -uU in ~/.profile
  2014-09-30 21:14 ` Eric Blake
@ 2014-09-30 22:34   ` Andrew DeFaria
  2014-10-01  7:31   ` Achim Gratz
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew DeFaria @ 2014-09-30 22:34 UTC (permalink / raw)
  To: cygwin

On 9/30/2014 1:12 PM, Eric Blake wrote:
> On 09/30/2014 11:53 AM, Andrew DeFaria wrote:
>> I recently debugged this. I share my home directory from a NetApp filer
>> such that I can use it from Cygwin or the various Linux machines at my
>> client (largely CentOS). Recently I started seeing:
>>
>> Adefaria-lt:ssh cm-db-ltest01
>> locale: invalid option -- 'u'
>> Try `locale --help' or `locale --usage' for more information.
>> Cm-db-test01:
>>
>> Hunting this down I found that I have a ~/.profile now (didn't have one
>> before) and contained therein is the following:
>>
>> # Set user-defined locale
>> export LANG=$(locale -uU)
>
> Sounds like cygwin's base-files should be updated to guard
> cygwin-specific .profile contents to only occur when uname says it is
> running on cygwin.  I'm sure the maintainer would love patches...
>
>>
>> Turns out that on CentOS locale doesn't support -uU. Now this .profile
>> came from a refreshing of Cygwin. How best to handle this...
>
> You can guard that with something as simple as:
>
> case $(uname) in
>    CYGWIN*) export LANG=$(locale -uU) ;;
> esac
>
> (hmm, the moment you also share the .profile with a Solaris box, you'd
> have to use `` instead of $(), but that's another story)
>

Is Solaris still that backward?!? I haven't been on a Solaris box for 
quite some time. Life's been good...
-- 
Andrew DeFaria
http://defaria.com


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: locale -uU in ~/.profile
  2014-09-30 21:14 ` Eric Blake
  2014-09-30 22:34   ` Andrew DeFaria
@ 2014-10-01  7:31   ` Achim Gratz
  1 sibling, 0 replies; 4+ messages in thread
From: Achim Gratz @ 2014-10-01  7:31 UTC (permalink / raw)
  To: cygwin

Eric Blake <eblake <at> redhat.com> writes:
> Sounds like cygwin's base-files should be updated to guard
> cygwin-specific .profile contents to only occur when uname says it is
> running on cygwin.  I'm sure the maintainer would love patches...

I'm listening... although default ~/.profile only gets installed if it
wasn't previously existing and I know of no other system that would
explicitly guard their default files for the possibility that these would be
shared with other systems (except the SunOS->Solaris transition).  Another
(or even better) option would be to move these kind of local setup into
/etc/profile.d.


Regards,
Achim.






--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-01  7:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-30 18:21 locale -uU in ~/.profile Andrew DeFaria
2014-09-30 21:14 ` Eric Blake
2014-09-30 22:34   ` Andrew DeFaria
2014-10-01  7:31   ` Achim Gratz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).