Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 227089 - app-arch/lzma-utils-4.32.6: lzgrep is #!/bin/sh but needs bash
Summary: app-arch/lzma-utils-4.32.6: lzgrep is #!/bin/sh but needs bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-15 07:59 UTC by Martin Väth
Modified: 2009-12-27 17:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
lzpipe-sh.patch (lzpipe-sh.patch,1.44 KB, patch)
2008-06-15 09:06 UTC, Peter Alfredsen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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