[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] latest ash has broken 'echo' command

Anthony Towns <aj@azure.humbug.org.au> writes:

> Cc'ed to the LSB spec list. Briefly, the Debian ash package recently
> changed it's implementation of echo to not support -e and -n behaviour
> in order to match the Single Unix Specification description of echo.
> (See http://www.UNIX-systems.org/single_unix_specification_v2/xcu/echo.html)

This seems like a dumb idea based on a dumb part of the SUS.  Perhaps it
is a good idea to encourage use of printf, but breaking echo is not the
right way to get there.

> This breaks a fair number of maintainer scripts and init.d scripts and
> such (and the change'll be reverted for the moment, at any rate). It
> seems like this might be a sensible thing to do somewhat differently
> to the SUS, in particular it might be nice to guarantee support of the
> -n and -e arguments.

I agree.

> FWIW, the LSB current just has a link to the SUS page as its definition
> of `echo'.

The LSB can use our own definition whenever the external definition is

> As such, by a strict reading, Debian is de facto non-LSB compliant. Of
> course, probably every distribution is too, since sh-utils and bash
> have non-compliant echo's, but anyway.

Technically speaking, Debian can't be non-LSB compliant since we have
released neither a complete specification nor LSB 1.0.

> In any event, this seems like an area we may as well just follow the LSB.
> If `echo -n' isn't guaranteed by the LSB, we probably should get rid of them
> from maintainer scripts. :-/

It *may* be a good idea to switch to printf in the long run, but I would
have been much happier if SUS didn't break echo in the first place.

- Dan

Reply to: