Priority: Urgent
Current State: Closed
Released In: 2.0.0
Target Release: major
Task originally reported:
on OSX, when grep is not found, the user gets a really bad and confusing error message
Could not perform search. Error was: exec failed: Inappropriate ioctl for device
thats super naf.
--
SvenDowideit - 19 Jan 2009
Another approach is to create default values in configure for different platforms. We know that on OS X grep is at
/usr/bin/grep
.
--
ArthurClemens - 07 Feb 2009
Come on. This is no near bring a release blocker.
Nothing prevent you from fixing a bug that is rated low or normal.
When people define the field correctly all works as it should. I cannot see that this is anywhere near being a release blocker.
--
KennethLavrsen - 10 Feb 2009
Perhaps its not a blocker, but the default value does not work. You have to know that you must set a different value. And that is not expected behaviour.
--
ArthurClemens - 11 Feb 2009
I have grep installed, at
/usr/bin/grep
and it is in the PATH.
I see this error message when running test suites.
--
MartinCleaver - 17 Mar 2009
I'm escalating this for 1.2. There is an issue that we have executable code in Foswiki.spec that attempts to guess the location of grep. If the $^O doesn't match, then the path won't be set correctly. Foswiki.spec and $^O results:
# bodgey up a default location for grep
# **STRING HIDDEN**
$Foswiki::cfg{_grepProgram} = '/bin/grep';
$Foswiki::cfg{_grepProgram} = '/usr/bin/grep' if ( $^O eq 'darwin' );
$Foswiki::cfg{_grepProgram} = 'c:/PROGRA~1/GnuWin32/bin/grep' if ( $^O eq 'MSWin32' );
[gac@foswiki ~]$ perl -e 'print "$^O\n";'
freebsd
So
FreeBSD falls through the cracks, $^O is 'freebsd', and the correct location, like darwin, is '/usr/bin/grep'. Also the windows location is unlikely to exist.
Use the bootstrap! A better solution would be to use either
CPAN:File::Which (yet another CPAN dependency) or a perl search of the path for grep. Now that we have the Bootstrap code, this would be better than logic in
Foswiki.spec
.
Also, other issues:
-
{_grepProgram}
is type "HIDDEN" in the spec file, which doesn't seem to actually hide the field.
- It's blank (on trunk.foswiki.org) but doesn't flag any errors. (trunk is only running because the original settings like
{Store}{EgrepCmd}
fully specify the path.)
--
GeorgeClark - 04 Nov 2014
Closed this before it was really ready....
--
CrawfordCurrie - 27 Nov 2014
Reopening this, as we fixed grep & egrep, but left all the RCS programs hardcoded to
/usr/bin/rcs
. They have the same issues.
--
GeorgeClark - 10 Apr 2015