bugGNU gettext - Bugs: bug #40262, msgfmt -c doesn't error

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #40262: msgfmt -c doesn't error

Submitter:  Peter Eisentraut <petere>
Submitted:  Mon 14 Oct 2013 01:38:08 AM UTC
   
 
Category:  Translator tools Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  ueno
Open/Closed:  Closed

Tue 13 May 2014 06:20:35 AM UTC, comment #3: 

Makes sense.  Pushed a fix:
http://git.savannah.gnu.org/cgit/gettext.git/commit/?h=maint&id=4aaaccd2

Sorry for the long delay.

Daiki Ueno <ueno>
Group administrator
Thu 05 Dec 2013 04:31:41 AM UTC, comment #2: 

According to gettext-po.in.h, PO_SEVERITY_ERROR is "the operation cannot complete", PO_SEVERITY_FATAL_ERROR is "the operation must be aborted".  That just distinguishes whether processing will continue after the error, but the exit code should still reflect the errors.

Since msgfmt is typically used in makefiles and such, not setting a proper exit code can be a significant problem.

Peter Eisentraut <petere>
Tue 15 Oct 2013 03:08:29 AM UTC, comment #1: 


> The code clearly distinguishes between warnings and errors, but somehow this doesn't end up reflected in the exit code.


However,  po_xerror seems also distinguish between PO_SEVERITY_ERROR and PO_SEVERITY_FATAL_ERROR, and only exits if the latter is specified.  So I guess the errors reported here is considered as kind of recoverable?

Daiki Ueno <ueno>
Group administrator
Mon 14 Oct 2013 01:38:08 AM UTC, original submission:  

Setup:

$ xgettext /dev/null --force-po
$ msgfmt -o /dev/null -c messages.po
messages.po: warning: Charset "CHARSET" is not a portable encoding name.
                      Message conversion to user's charset might not work.
msgfmt: messages.po: warning: PO file header fuzzy
                     warning: older versions of msgfmt will give an error on this
messages.po:8: header field 'Project-Id-Version' still has the initial default value
messages.po:8: header field 'Content-Type' still has the initial default value
messages.po:8: warning: header field 'Language' still has the initial default value
$ echo $?
0

I think this should return a non-zero exit code.

The code clearly distinguishes between warnings and errors, but somehow this doesn't end up reflected in the exit code.

Peter Eisentraut <petere>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by petere (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2016-11-27 haible CategoryNone Translator tools
        Assigned toNone ueno
    2014-05-13 ueno StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code