Subject: Re: test: ==: unexpected operator
To: None <tech-userlevel@NetBSD.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-userlevel
Date: 09/24/2006 19:38:57
On Fri, 22 Sep 2006, Hubert Feyrer wrote:
> bash/Linux allows "==" as an alternative to "=" in their test(1) command.
> I wonder if we want to save some trouble and just make our test(1) silently 
> accept that too, instead of fixing all the broken scripts out there.
>
> It'd be an extension to POSIX, so I don't see much of a problem.
>
> Any thoughts?

Apparently there were quite a number of them, and instead of addressing 
eac of them I'd like to explain my motivation behind this change, after 
the uproar and namecalling that I got:

  * I see NetBSD as an operating system project, and for me an OS is
    something to run software written not only from "NetBSD" but from
    any user. If someone thinks '==' is preferably over/equivalent to '='
    for test(1) I see no problem improving NetBSD's usability instead of
    printing an error messagen. There's prior art in bash to handle '=='
    which is used as /bin/sh on a majority of machines out there, so trying
    to help the user seemed OK for me.
  * The change was not intended to 'encourage' anyone to use the feature in
    their own scripts. If discouragement of writing such could best
    be reached by documentation, warnings or plain errors could be
    discussed separately
  * Whether or not this is described by POSIX has little meaning here,
    given that NetBSD does not fulfull POSIX in many parts, and adds many
    extensions in others.
  * pkgsrc at least was founded as _NetBSD_s Packages Collection (by Al
    and me), and while I find the argument cute that we should dumb down
    NetBSD to detect errors for operating systems, I'd rather make work
    for people porting software _to NetBSD_ easiler, thank you very much.
  * Of course there's a big bunch of people out there that say that bash is
    all wrong, offering non-"standard" behaviour. Guess what: I agree.
    But: I'm not working on Bash, I'm not working on Linux, and I can't
    improve all the Linux programmers and -wannabes out there that write
    code that runs on bash. I encourage everyone to go out and educate
    the programmers that use 'test ==', and maybe even get bash to behave
    as much of a POSIX compliant shell as possible when called as /bin/sh.
    Go, do it - but remember that this is work outside of NetBSD.
  * The tone of voice a number of the people have used in this "discussion"
    was quite a (negative) surprise to me. To say the least.

In summary, I think little people in this "discussion" cared for the 
actual goal of making NetBSD more usable here, but rather cared to
voice their opinion on what random shell script writers / Linux 
programmers, people that write documentation that tells using 'test 
==' is ok and maybe even bash maintainers do.

I have no desire to continue squabbling with the vocal majority here,
and thus chose to back out the change.


  - Hubert