bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failing test on Solaris 8 Sparc w/Sun Studio 11


From: Dagobert Michelsen
Subject: Re: Failing test on Solaris 8 Sparc w/Sun Studio 11
Date: Tue, 26 Jan 2010 09:12:54 +0100

Hi,

Am 26.01.2010 um 08:57 schrieb Jim Meyering:
Dagobert Michelsen wrote:
Further investigation showed that the problem is a call of the generic
system-wide
grep from Solaris in zgrep which doesn't understand several of the
flags. Replacing
the invocation with a gnu grep solved the problem:

Thanks for the report and diagnosis.
While changing the zgrep script does indeed solve
your problem, you should consider adjusting your
shell's search patch instead.

If you put /opt/csw/bin in "PATH" before /bin and /usr/bin,
that will solve the problem, too.  It has the added benefit
of making your use of "grep" on the command line select the
more featureful version.

The problem goes a bit deeper: I am building the package for
the OpenCSW project. There is also a gzip in the Solaris
distribution, which is however older. The user may choose
to select the OpenCSW tools by either extending PATH as you
suggested or execute it directly by specifying the absolute
path. Relying on the PATH means moving the responsibility
of having a functional zgrep in /opt/csw/bin to the user
which will most certainly provoke bug reports from the OpenCSW
users. The usual way here is to have a self-enclosed package
entity which depends on the OpenCSW-shipped GNU grep.

However, I think it would be nice to detect a grep during configure time which knows the flags or let the packager choose a grep to be included
without patching the source.

There are pros and cons of hard-coding an absolute path to grep in a
script like zgrep. Currently, it seems preferable *not* to hard- code it,
and instead to let the user's PATH select which one to use.

In my specific case I would consider it useful, however, I understand
that this is not the general usecase and would accept if you
don't add the functionality of hardcoding grep. Anyway, an option like
  --with-grep=/opt/csw/bin/grep
would elegantly solve at least my problem without the need to patch :-)


Best regards

  -- Dago




reply via email to

[Prev in Thread] Current Thread [Next in Thread]