Bug 110217 - When '-o output-file' or '--output-file=output-file' option is specified, msgfmt(1) doesn't ignore duplicate msgids in the portable object file.
When '-o output-file' or '--output-file=output-file' option is specified, msg...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gettext (Show other bugs)
3.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Leon Ho
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-17 01:51 EST by L3support
Modified: 2015-01-07 19:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-21 02:22:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description L3support 2003-11-17 01:51:04 EST
Description of problem:
When '-o output-file' or '--output-file=output-file' option is specified, 
msgfmt(1) doesn't ignore duplicate msgids in the portable object file.
According to 'LI18NUX 2000 Globalization Specification', 
when '-o output-file' or '--output-file=output-file' option is specified, 
all domain directives and duplicate msgids in the .po file must be
ignored.

Version-Release number of selected component (if applicable):
0.11.4-7

How reproducible:
always

Steps to Reproduce:
1. $ msgfmt -o test.mo test-msgfmt.po

---
# Portable object file test-msgfmt.po
# 1st one
domain  "first.mo"
msgid   "hello"
msgstr  "hello-first"

# 2nd one
domain  "second.mo"
msgid   "hello"
msgstr  "hello-second"

# 3rd one
domain  "third.mo"
msgid   "hello"
msgstr  "hello-third"
---

Actual results:
$ msgfmt -o test.mo test-msgfmt.po
test-msgfmt.po:11: duplicate message definition
test-msgfmt.po:7: ...this is the location of the first definition
test-msgfmt.po:16: duplicate message definition
test-msgfmt.po:7: ...this is the location of the first definition
msgfmt: found 2 fatal errors


Expected results:
duplicate msgids are ignored. 

Additional info:
Comment 1 Leon Ho 2004-05-21 02:22:39 EDT
Thanks for your report. I have contacted with the upstream and here is
what the gettext upstream maintainer talk about this situation:
"'LI18NUX 2000 Globalization Specification' has evolved into (and been
obsoleted by) the OpenI18N specification 1.3
http://www.openi18n.org/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=53&page=1

It doesn't contain the specification about msgfmt any more, because
this one has been moved to LSB (http://www.linuxbase.org/spec/). LSB
1.3 contains the same text as you say, however the LSB 1.96 has this
instead:
   "If multiple domains or duplicate
    msgids in the .po file are present, the behavior is unspecified."

So I conclude that the LI18NUX 2000 and LSB 1.3 specifications were
too strict on this issue, and the spec was relaxed to follow the
changed behaviour of GNU msgfmt."


Note You need to log in before you can comment on or make changes to this bug.