delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/14/16:27:58

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <399853B0.631A9BC8@phekda.freeserve.co.uk>
Date: Mon, 14 Aug 2000 21:16:48 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.14 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: DJGPP workers <djgpp-workers AT delorie DOT com>
CC: Prashant TR <prashant_tr AT yahoo DOT com>, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Subject: Problems with depcomp from fileutils 4.0x & bash 2.03
Reply-To: djgpp-workers AT delorie DOT com

Hello.

I tried to build fileutils 4.0x at the weekend, but I hit a problem with
depcomp. With some help from Prashant and Eli the problem was narrowed
down to bash 2.03 (thanks guys!). This is actually a problem earlier
encountered in the djgpp-workers thread "Porting problems with Sh-utils
(beta)" - the first mail is dated Sat, 8 Apr 2000 18:49:49 +0500 on my
system.

Here is the problem: when passing parameters to a command using backticks,
the supplied environment is ignored. E.g.

a=foo ./someprog `echo hello`

will not pass $a to 'someprog'.

Here's a simple test program:

---BEGIN echo-a---
echo Args: $*
echo $a
---END echo-a---

Here's an example session showing the problem:

---START results.txt---
bash203-2.03$ ls -al
total 5
drwxr-xr-x   2 rich     root           64 Aug 14 20:59 ./
drwxr-xr-x  37 rich     root         2400 Mar 19 13:29 ../
-rw-r--r--   1 rich     root           24 Aug 14 21:00 echo-a
bash203-2.03$ test -f echo-a; echo $?
0
bash203-2.03$ a=foo ./echo-a
Args:
foo
bash203-2.03$ a=foo ./echo-a `test -f echo-a`
Args:

bash203-2.03$ a=foo ./echo-a `test -f ./echo-a`
Args:

bash203-2.03$ a=foo /bin/bash203.exe echo-a `test -f ./echo-a`
Args:

bash203-2.03$ a=foo /bin/bash203.exe echo-a
Args:
foo
---END results.txt---

Please note that my bash 2.03 was installed in /bin, because I have beta
5c of bash 2.04 installed. The second set of invocations is to show that
bash 2.03 is actually being using when doing './echo-a'.

Thankfully this problem does not exist in bash 2.04 beta 5c. Are there any
plans to fix this problem in bash 2.03?

Thanks, bye, Rich =]

-- 
Richard Dawe
[ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]

- Raw text -


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