Re: bash manual

2006-10-17 Thread V. Mark Lehky

Hi,

I can't find this text in my manual. Is there a more recent version somewhere 
than ?


So, since 'export -f' apparently does the same thing as 'declare -xf', I'm just 
wondering why have two commands do the same thing? Or did I interpret that wrong?


Thanx, VML.


Chet Ramey wrote:

V. Mark Lehky wrote:

Hi,

This is in reference to "Edition 2.5b, last updated 15 July 2002, of The
GNU Bash Reference Manual".

Please, please, please, for the sake of future generations, make the
following addition in two spots in the next release of the manual. I
just spent like three hours hunting this down:


I think the existing text in the Shell Functions section is OK:

Functions may be exported so that subshells
automatically have them defined with the -f
option to the export builtin.
Note that shell functions and variables with the same name may result
in multiple identically-named entries in the environment passed to the
shell's children.
Care should be taken in cases where this may cause a problem.

Chet



___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: bash manual

2006-10-17 Thread Chet Ramey
V. Mark Lehky wrote:
> Hi,
> 
> I can't find this text in my manual. Is there a more recent version
> somewhere than ?

Sure.  The 2.05b manual is over four years old.  Try
http://cnswww.cns.cwru.edu/~chet/bash/bashref.html
for the current (bash-3.2) edition.

> 
> So, since 'export -f' apparently does the same thing as 'declare -xf',
> I'm just wondering why have two commands do the same thing? Or did I
> interpret that wrong?

`export' exists because it is historical and because POSIX requires it.
`declare' is a way, much like the ksh `typeset', to have one mechanism
to manipulate variables and their attributes.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
   Live Strong.  No day but today.
Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: bash manual

2006-10-17 Thread V. Mark Lehky

OK,
Thank You, VML.


Chet Ramey wrote:

V. Mark Lehky wrote:

Hi,

I can't find this text in my manual. Is there a more recent version
somewhere than ?


Sure.  The 2.05b manual is over four years old.  Try
http://cnswww.cns.cwru.edu/~chet/bash/bashref.html
for the current (bash-3.2) edition.


So, since 'export -f' apparently does the same thing as 'declare -xf',
I'm just wondering why have two commands do the same thing? Or did I
interpret that wrong?


`export' exists because it is historical and because POSIX requires it.
`declare' is a way, much like the ksh `typeset', to have one mechanism
to manipulate variables and their attributes.

Chet



___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


bash 3.2 breaks KDE 3.x configure scripts

2006-10-17 Thread Bernhard Rosenkraenzer
Trying to run ./configure (fairly standard autoconf generated script) for KDE 
3.x kdebase results in:

checking for MAXPATHLEN... ./configure: line 61366: syntax error near 
unexpected token `do'
./configure: line 61366: `  dirs=`for i in $files; do if test -d $i; then echo 
$i; fi; done`'

As usual with autoconf generated scripts, the actual problem is nowhere near 
that line and hard to trace :/
(The actual trouble seems to start about 2 lines earlier, after checking 
for MAXPATHLEN... is printed -- apparently bash 3.2 thinks there's a quote 
being opened when there isn't, adding some echo WHATEVER >/dev/stderr after  
MAXPATHLEN is printed results in them being ignored).

It works after reverting to bash 3.1 (while leaving KDE/autoconf the same)


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: bash 3.2 breaks KDE 3.x configure scripts

2006-10-17 Thread Bernhard Rosenkraenzer
On Tuesday, 17. October 2006 14:14, Bernhard Rosenkraenzer wrote:
> Trying to run ./configure (fairly standard autoconf generated script) for
> KDE 3.x kdebase results in [...]
>
> It works after reverting to bash 3.1 (while leaving KDE/autoconf the same)

Fix for bash 3.2 attached.
--- bash-3.2/parse.y.ark~	2006-09-19 22:37:21.0 +0200
+++ bash-3.2/parse.y	2006-10-17 16:53:20.0 +0200
@@ -2735,7 +2735,7 @@
 /* itrace("parse_matched_pair: open = %c close = %c", open, close); */
   count = 1;
   pass_next_character = backq_backslash = was_dollar = in_comment = 0;
-  check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
+  check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && qc != '`' && (flags & P_DQUOTE) == 0;
 
   /* RFLAGS is the set of flags we want to pass to recursive calls. */
   rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE);
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Bash-3.2 Official patch 1

2006-10-17 Thread Chet Ramey
 BASH PATCH REPORT
 =

Bash-Release: 3.2
Patch-ID: bash32-001

Bug-Reported-by:Greg Schafer <[EMAIL PROTECTED]>
Bug-Reference-ID:   <[EMAIL PROTECTED]>
Bug-Reference-URL:  
http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00046.html

Bug-Description:

When using historical ``-style command substitution, bash incorrectly attempts
to interpret shell comments while scanning for the closing backquote.

Patch:

*** ../bash-3.2/parse.y Tue Sep 19 16:37:21 2006
--- parse.y Thu Oct 12 10:30:57 2006
***
*** 2736,2740 
count = 1;
pass_next_character = backq_backslash = was_dollar = in_comment = 0;
!   check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & 
P_DQUOTE) == 0;
  
/* RFLAGS is the set of flags we want to pass to recursive calls. */
--- 2736,2740 
count = 1;
pass_next_character = backq_backslash = was_dollar = in_comment = 0;
!   check_comment = (flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' 
&& (flags & P_DQUOTE) == 0;
  
/* RFLAGS is the set of flags we want to pass to recursive calls. */
*** ../bash-3.2/patchlevel.hThu Apr 13 08:31:04 2006
--- patchlevel.hMon Oct 16 14:22:54 2006
***
*** 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 0
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 1
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
   Live Strong.  No day but today.
Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash