Bug 801374 - autopoint fails if GREP_OPTIONS contains -n
Summary: autopoint fails if GREP_OPTIONS contains -n
Alias: None
Product: Fedora
Classification: Fedora
Component: gettext
Version: 20
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Daiki Ueno
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-03-08 11:40 UTC by Jan Cholasta
Modified: 2015-01-19 05:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-01-19 05:31:09 UTC
Type: ---

Attachments (Terms of Use)

Description Jan Cholasta 2012-03-08 11:40:24 UTC
Description of problem:
autopoint fails if the GREP_OPTIONS environment variable contains the -n (prefix each line of output with line number) option.

This happens because autopoint assumes that grep outputs lines of the source file in an unmodified form, which is not always true.

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

How reproducible:

Steps to Reproduce:
1. cd to a directory with a configure.ac file which contains the AM_GNU_GETTEXT_VERSION macro
2. run "GREP_OPTIONS=-n autopoint --force"
Actual results:
autopoint: *** Missing version: please specify in configure.ac through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using
autopoint: *** Stop.
autoreconf: autopoint failed with exit status: 1

Expected results:
autopoint succeeds as if the -n grep option was not set.

Additional info:

Comment 1 Jens Petersen 2012-03-13 08:31:34 UTC
I see - thanks for the report.

So do you suggest that autopoint unsets (ignores) GREP_OPTIONS?

Comment 2 Jens Petersen 2012-03-13 08:32:58 UTC
Do you have to export GREP_OPTIONS ?

Comment 3 Jan Cholasta 2012-03-13 10:19:23 UTC
The variable has to be set in the environment from which autopoint is started, so yes, probably.

For the record, I had the "export GREP_OPTIONS=-n" line in my .bash_profile when I noticed the bug.

Comment 4 Jens Petersen 2012-03-15 03:20:37 UTC
(In reply to comment #3)
> For the record, I had the "export GREP_OPTIONS=-n" line in my .bash_profile
> when I noticed the bug.

That was my question: do you really need to export it?

Comment 5 Jan Cholasta 2012-03-15 07:46:45 UTC
Yes, I want the line numbers in grep output (and no, it doesn't work without exporting the variable).

BTW, there are several gzip invocations in autopoint - gzip uses $GZIP for default options, it should probably be handled as well.

Comment 6 Jens Petersen 2012-04-02 00:41:59 UTC
I see.

Ok, probably we should ask gettext upstream about GREP_OPTIONS,
but I suppose autopoint could be patched to unset it.

In the meantime perhaps you could make a ~/bin/autopoint
wrapper script to handle it.

Comment 7 Jens Petersen 2012-09-03 05:29:52 UTC
http://lists.gnu.org/archive/html/bug-gettext/2012-07/msg00005.html was my post - no follows yet to date.

Comment 8 Fedora End Of Life 2013-01-16 22:39:34 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 9 Fedora Admin XMLRPC Client 2013-01-22 04:08:42 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Fedora End Of Life 2013-04-03 19:19:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:

Comment 12 Jens Petersen 2015-01-08 05:18:09 UTC
I guess this is fixed in F21+?

Comment 13 Fedora Update System 2015-01-08 06:54:18 UTC
gettext- has been submitted as an update for Fedora 20.

Comment 14 Fedora Update System 2015-01-17 05:35:52 UTC
gettext- has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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