[Xapian-tickets] [Xapian] #405: xapian-config doesn't work with Solaris /bin/sh

Xapian nobody at xapian.org
Tue Sep 22 17:44:05 BST 2009


#405: xapian-config doesn't work with Solaris /bin/sh
--------------------------+-------------------------------------------------
 Reporter:  dmichelsen    |       Owner:  olly    
     Type:  defect        |      Status:  assigned
 Priority:  normal        |   Milestone:  1.1.3   
Component:  Build system  |     Version:  1.0.11  
 Severity:  normal        |    Keywords:          
Blockedby:                |    Platform:  Solaris 
 Blocking:                |  
--------------------------+-------------------------------------------------

Comment(by dmichelsen):

 Replying to [comment:1 olly]:
 > I'm guessing the issue is with $1 and assigning that to a temporary
 variable might help.  Can you try running the attached test script with
 Solaris /bin/sh?

 This hangs on Solaris 8:
 {{{
 build8s% ./dlname-test
 Usage: grep -hblcnsviw pattern file . . .
 ^C
 build8s%
 }}}
 It recurses indefinitely:
 {{{
 build8s% ptree 3518
 10336 /opt/csw/sbin/sshd
   371   /opt/csw/sbin/sshd -R
     373   /opt/csw/sbin/sshd -R
       375   -zsh
         2590  /bin/sh ./dlname-test
           2591  /bin/sh ./dlname-test
 ...
 }}}
 When I change the line to `extract_dlname "stuff"` and put `dlname=abc`
 into `stuff` the following files are stat'ed:
 {{{
 10000  17089 dlname-test   -1 /usr/bin/"$lafile"
 10000  17089 dlname-test   -1 /bin/"$lafile"
 10000  17089 dlname-test   -1 /usr/sbin/"$lafile"
 10000  17089 dlname-test   -1 /sbin/"$lafile"
 10000  17089 dlname-test   -1 /opt/csw/bin/"$lafile"
 10000  17089 dlname-test   -1 /usr/ccs/bin/"$lafile"
 10000  17089 dlname-test   -1 /opt/csw/bin/"$lafile"
 10000  17090 dlname-test   -1 /usr/bin/stuff
 10000  17090 dlname-test   -1 /bin/stuff
 10000  17090 dlname-test   -1 /usr/sbin/stuff
 10000  17090 dlname-test   -1 /sbin/stuff
 10000  17090 dlname-test   -1 /opt/csw/bin/stuff
 10000  17090 dlname-test   -1 /usr/ccs/bin/stuff
 10000  17090 dlname-test   -1 /opt/csw/bin/stuff
 }}}

 I am not exactly sure what is happening here, but escaping the carret does
 the trick:
 {{{
 eval `grep \^dlname= "$lafile" 2>/dev/null`
 }}}

-- 
Ticket URL: <http://trac.xapian.org/ticket/405#comment:2>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list