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] New: localedef does not return error status when warnings were issued.


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

            Bug ID: 25195
           Summary: localedef does not return error status when warnings
                    were issued.
           Product: glibc
           Version: 2.29
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: locale
          Assignee: unassigned at sourceware dot org
          Reporter: slyfox at inbox dot ru
  Target Milestone: ---

The bug was originally discovered in https://bugs.gentoo.org/697908 by Chris
Slycord. There we ended up passing invalid charset (with trailing '\r') to
localedef. Here is the reproducer:

"""
# /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
"""

'man localedef' says:

"""
    EXIT STATUS
       One of the following exit values can be returned by localedef:
          0         Command completed successfully.
          1         Warnings or errors occurred, output files were written.
          4         Errors encountered, no output created.
"""

I'm not sure if output was created but the '[error]' warning (or error?) was
issued.

I think the exit status should be non-zero.

-- 
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]