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

 
 

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

bug #40262: msgfmt -c doesn't error

Submitted by:  Peter Eisentraut <petere>
Submitted on:  Mon Oct 14 01:38:08 2013  
 
Category: Translator toolsSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Daiki Ueno <ueno>
Open/Closed: Closed

Tue May 13 06:20:35 2014, 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>
Project AdministratorIn charge of this item.
Thu Dec 5 04:31:41 2013, 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 Oct 15 03:08:29 2013, 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>
Project AdministratorIn charge of this item.
Mon Oct 14 01:38:08 2013, 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Nov 27 01:52:23 2016haibleCategoryNone=>Translator tools
      Assigned toNone=>ueno
    Tue May 13 06:20:35 2014uenoStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup