This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug locale/25195] localedef does not return error status when warnings were issued.


https://sourceware.org/bugzilla/show_bug.cgi?id=25195

--- Comment #4 from Sergei Trofimovich <slyfox at inbox dot ru> ---
(In reply to Carlos O'Donell from comment #2)
> (In reply to Sergei Trofimovich from comment #0)
> > """
> > # /usr/bin/localedef -c --no-archive -i en_US -f $'ISO-8859-1\r' -A
> > /usr/share/locale/locale.alias --prefix / en_US |& cat -v
> > failed to set locale!
> > [error] character map file `ISO-8859-1^M' not found: No such file or
> > directory
> > 
> > # echo $?
> > 0
> > """
> 
> You ran two commands. The $? is the exit code of the second command in the
> pipe. The exit code of cat was 0 (success) which is expected.

Ah, my apologies for confusion. I tested the command before adding 'cat' for
escaping. Here is to original breakage:

  # /usr/bin/localedef -c --no-archive -i en_US -f $'ISO-8859-1\r' -A
/usr/share/locale/locale.alias --prefix / en_US; echo $?
  failed to set locale!
  ' not found: No such file or directory
  0

> If you run just the localedef command:
> 
> /usr/bin/localedef -c --no-archive -i en_US -f 'ISO-8859-1\r' -A
> /usr/share/locale/locale.alias --prefix / en_US
> [error] character map file `ISO-8859-1\r' not found: No such file or
> directory
> [error] cannot write output files to `//usr/lib/locale/en_US/': Permission
> denied
> echo $?
> 4

I think you have a different, permission-related problem here.

(In reply to Carlos O'Donell from comment #3)
> (In reply to Carlos O'Donell from comment #2)
> > Note: I removed the '$' in front of the charmap because it doesn't seem to
> > apply to the example you were trying to create.
> 
> Sorry, forgot this was ANSI-C quoting.

'\r' just makes the output most confusing :) Looks like it can be reproduced by
any invalid sharset name:

# /usr/bin/localedef -c --no-archive -i en_US -f 'ISO-8859-1-whee' -A
/usr/share/locale/locale.alias --prefix / en_US; echo $?
failed to set locale!
[error] character map file `ISO-8859-1-whee' not found: No such file or
directory
0

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]