Bug#860545: debootstrap fails to locate xzcat if the default shell is set to posh
On Tue, Apr 18, 2017 at 04:33:55PM +0200, Sven Joachim wrote:
>On 2017-04-18 14:52 +0100, Steve McIntyre wrote:
>> Just tested this - it appears that posh doesn't include "type", which
>> is what debootstrap is using to check what's available. I don't
>> personally know if "type" is a hard requirement in a posix shell here.
>It's not. The portable equivalent would be 'command -v', however posh
>does not implement that either, since it only became mandatory in
>POSIX.1-2008. I'm afraid there is no easy better solution: while
>'which' would always work on Debian systems, it's not guaranteed to be
There are other hacky ways of trying this out - try "type ls" to see
if type works, then fall back to which, etc. Or actually try running
the extractor command (xzcat /dev/null), and check for the return
But those are all hacky solutions. Maybe better to just detect posh
and bail with a message "get a real shell", then...
Steve McIntyre, Cambridge, UK. email@example.com
Debian does NOT ship free CDs. Please do NOT contact the mailing
lists asking us to send them to you.