Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 567660 - net-proxy/polipo: using dash as default: /lib64/rc/sh/openrc-run.sh: 40: /lib64/rc/sh/openrc-run.sh: [[: not found
Summary: net-proxy/polipo: using dash as default: /lib64/rc/sh/openrc-run.sh: 40: /lib...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew Savchenko
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2015-12-06 18:08 UTC by tharvik
Modified: 2015-12-07 22:59 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tharvik 2015-12-06 18:08:20 UTC
If you switch to use a sh compliant shell (like dash) instead of bash, the init script of polipo fail to correctly run with an error `/lib64/rc/sh/openrc-run.sh: 40: /lib64/rc/sh/openrc-run.sh: [[: not found`.

It happens because using '[[' or ']]' for test is a bash extension, there should not be any issue to replace it with a single '[' and ']'.

Failing currently with 1.1.1 and 1.1.1-r1.

Steps
* emerge dash eselect-sh
* eselect sh set dash
* rc-service polipo start
Comment 1 Andrew Savchenko gentoo-dev 2015-12-06 19:17:22 UTC
Single brackets are much slower then double ones, since single bracket is an external application call and double one is the bash built-in.
Comment 2 tharvik 2015-12-06 20:07:28 UTC
(In reply to Andrew Savchenko from comment #1)
> Single brackets are much slower then double ones, since single bracket is an
> external application call and double one is the bash built-in.

Speed is not really an issue here, is it?
Also, on dash, `type [` shows that it is a shell builtin, maybe it is not the case in every POSIX shell.
Comment 3 Andrew Savchenko gentoo-dev 2015-12-07 12:41:07 UTC
One day OpenRC should support selectible interpreter, so anyone will be happy.
Comment 4 Andrew Savchenko gentoo-dev 2015-12-07 22:59:45 UTC
Oh, forgot to mention that one have to update to polipo-1.1.1-r2 for the fix.