mainAutoconf - Support: sr #107444, constructs generated by autoconf...

 
 

sr #107444: constructs generated by autoconf do not work in the ash shell

Submitter:  Mark Hobley <markhobley>
Submitted:  Tue 03 Aug 2010 08:30:57 AM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  Works For Me Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 10 Jul 2020 03:32:37 PM UTC, comment #4: 

We never heard back regarding exactly which version of ash was affected, and current versions of dash are not affected, so I am closing this bug.

Zack Weinberg <zackw>
Group administrator
Thu 16 Sep 2010 10:31:08 PM UTC, comment #3: 

Mark, I really need information on which version of ash this affects, before I can do anything about this bug report.  Can you please answer?

Eric Blake <ericb>
Group administrator
Tue 03 Aug 2010 05:52:00 PM UTC, comment #2: 

Please report this to the dash maintainer, as Posix requires parameter expansion to occur for this word (quoting from SuSv3):

   If the redirection operator is "<<" or "<<-" , the word that follows the redirection        
   operator shall be subjected to quote removal; it is unspecified whether any of the other    
   expansions occur. For the other redirection operators, the word that follows the            
   redirection operator shall be subjected to tilde expansion, parameter expansion, command    
   substitution, arithmetic expansion, and quote removal. Pathname expansion shall not be      
   performed on the word by a non-interactive shell; an interactive shell may perform it, but  
   shall do so only when the expansion would result in one word.                               

Which dash version is this BTW (or is it a real Almquist ash rather than dash)?  My Debian dash 0.5.4-12 does not seem to have a problem with this construct.

Ralf Wildenhues <rwild>
Group Member
Tue 03 Aug 2010 09:10:58 AM UTC, comment #1: 

Can you check if this works:

  set abc 2
  eval "echo \$1 >&$2"

Paolo Bonzini <bonzini>
Tue 03 Aug 2010 08:30:57 AM UTC, original submission:  


Some versions of the ash shell will not allow redirection to a stream number held in a variable:

  # This construct does not work in some versions of the ash shell
  echo $1 >&$2

The autoconf tool sometimes generates scripts using this construct, The following is an example of a code snippet using this construct in a configure script:

  if test "$3"; then as_lineno=${as_lineno-"$2"}
    as_lineno_stack=as_lineno_stack=$as_lineno_stack
    $as_echo "$as_me:${as_lineno-$LINENUM}: error: $1" >&$3
  fi

(I think this is coming from the _AS_ECHO_LOG macro).

Mark.


PS: I tried to report this via email to -email is unavailable-
but the mail just bounces. There may be a fault with the bug tracker:

Message-ID: <562582.29288.qm@web26503.mail.ukl.yahoo.com>
<bug-autoconf@gnu.org>:
140.186.70.92 does not like recipient.
Remote host said: 550 (result of an earlier callout reused).
Giving up on 140.186.70.92.

Mark Hobley <markhobley>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by ericb (Posted a comment)
  • -email is unavailable- added by rwild (Posted a comment)
  • -email is unavailable- added by bonzini (Posted a comment)
  • -email is unavailable- added by markhobley (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-10 zackw Open/ClosedOpen Closed
    2020-07-10 zackw StatusNeed Info Works For Me
    2010-08-03 rwild StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code