Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 227089

Summary: app-arch/lzma-utils-4.32.6: lzgrep is #!/bin/sh but needs bash
Product: Gentoo Linux Reporter: Martin Väth <martin>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: esigra, loki_val
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: lzpipe-sh.patch

Description Martin Väth 2008-06-15 07:59:34 UTC
If /bin/sh is a symlink to dash, "lzgrep something *.lzma" always immediately returns with an error.
I did not check all the whole script, but it is full of bashisms like
${VAR//...}. When #!/bin/sh is replaced by #!/bin/bash there are no problems.
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2008-06-15 09:06:12 UTC
Created attachment 156833 [details, diff]
lzpipe-sh.patch

This fixes it for sh -> dash.
Comment 2 SpanKY gentoo-dev 2008-06-16 21:16:50 UTC
do not check BASH_VERSION ... run it in a subshell first before trying to use it in the active shell
Comment 3 Timothy Redaelli (RETIRED) gentoo-dev 2009-03-03 23:08:56 UTC
(In reply to comment #2)
> do not check BASH_VERSION ... run it in a subshell first before trying to use
> it in the active shell

I think is useless to check for bash here, a not supporting shell should ignore it without any problem
Comment 4 SpanKY gentoo-dev 2009-09-11 15:37:26 UTC
xz-utils is POSIX code