delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/03/18/08:23:14

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3AB4B541.2E8B3692@phekda.freeserve.co.uk>
Date: Sun, 18 Mar 2001 13:16:49 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.17 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
CC: Jim Meyering <meyering AT ascend DOT com>
Subject: Re: Fetish.pm band-aid (Fileutils testsuite)
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1010306105723 DOT 7922J-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Eli Zaretskii wrote:
[snip]
> For `system' to use the value of $SHELL, it must point to an actual file
> name of the shell, including its full path and the extension.
[snip]
> Richard Dawe wrote:
> 
> > To configure Fileutils 4.0 and have the test suite avoid the
> > redirection problems, I used the following:
> >
> >     CONFIG_SHELL=$DJDIR/bin/bash.exe ./configure --disable-nls
> >
> > $CONFIG_SHELL needs to be set rather than $SHELL, because
> > share/config.site overrides $SHELL.
> 
> I'd suggest a more local solution: have Fetish.pm detect it runs in
> the DJGPP environment (e.g., by looking at $DJDIR) and if so, export
> "SHELL=/dev/env/DJDIR/bin/bash.exe" into the environment.

Well, I've hit another problem. It appears that the port of Perl 5.005_02
has not been compiled with DJGPP 2.03, so it does not understand
/dev/env/DJDIR. This means the system() calls in Fetish.pm fail, because
/dev/env/DJDIR/bin/bash.exe is not recognised as a valid executable.

I checked that I have the latest binaries. Laszlo Molnar (or anyone else)
- are you planning to recompile the port with DJGPP 2.03? Recompilation
with 2.03 would solve this problem.

In the meantime, below is a diff to provide the local solution suggested
by Eli.

Thanks, bye, Rich =]

*** orig/fileutils-4.0/tests/Fetish.pm  Sat Oct 17 14:47:22 1998
--- gnu.dev/filutil4.0/tests/Fetish.pm  Sun Mar 18 13:12:56 2001
***************
*** 23,28 ****
--- 23,35 ----
  my $srcdir = $ENV{srcdir};
  my $Global_count = 1;

+ # (richdawe AT bigfoot DOT com): If we're running in a DJGPP environment, set
up
+ # $ENV{'SHELL'} to point to bash. If we don't do this, a bad shell might
+ # be used (e.g. command.com) and the tests will just fail.
+ if (defined($ENV{'DJDIR'})) {
+     $ENV{'SHELL'} = $ENV{'DJDIR'}.'/bin/bash.exe';
+ }
+
  # A file spec: a scalar or a reference to a single-keyed hash
  # ================
  # 'contents'               contents only (file name is derived from test
name)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019