They're painful indeed but that's upstream (i.e script writer) fault.
This reminds me of that bash/dash as /bin/sh argument, not the fact
that all scripts need to be written as sh, but that if they start
with /bin/sh shebang, then they shall be sh compliant and not use bash
features. If so, then they should shebang to /bin/bash. And so it was
upstream task to either change their script to point to /bin/bash or
make them /bin/sh compatible.
Sadly we are in a different calling case so we can't change shebang
when there's none. My feeling is that if we encounter a script failing
on BSD (really, non-GNU in fact and not only BSD) sed then we should
notify upstream instead of trying to hack things around (as this will
bite us back at some point, and only induce complexity later on).
Notifying upstream will be beneficial to all, even non-ArchOSX users,
and starting with upstream itself. This is also at the core of the
Arch philosophy, where staying as vanilla as possible is a consequence
of KISS.
So we have a problem with scripts depending on GNU sed, that I totally
agree, but hacks are out of question to get out of this. We support
Darwin as a platform, so I feel we should not force GNU tools on
people, the same way upstream should not force them on us. A user
should be able to set his path in the order he wants, prioritizing BSD
or GNU, and it should just work.
BTW I'd like to voice my personal preference of using non-GNU tools on
my machine for some reason, including that I use them regularly on
various platforms at work.
On Aug 6, 7:38 pm, Kevin Barry <
bar...@gmail.com> wrote:
> When I first ran into the incompatibility I did think it was true on FreeBSD
> as well (the Mac sed man page is from FreeBSD) however I had since thought
> that wasn't true for some reason, but I tried on FreeBSD and sure indeed
> they are the same, so I can't just blame Apple for this. But it is much more
> frustrating than ls --colors. ls --colors is for a user, but sed is used in
> scripts all the time. Having that kind of incompatibility in scripts really
> hurts the cross platform nature.
>
> On Thu, Aug 6, 2009 at 3:50 AM, Loic Nageleisen
> <
loic.nagelei...@gmail.com>wrote: