| 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 packages | Assignee: | 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 | ||
Created attachment 156833 [details, diff]
lzpipe-sh.patch
This fixes it for sh -> dash.
do not check BASH_VERSION ... run it in a subshell first before trying to use it in the active shell (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 xz-utils is POSIX code |
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.