[PATCH] ash: make bash_source command search current directory after PATH

Mike Frysinger vapier at gentoo.org
Mon Jan 29 18:50:09 UTC 2018


On 29 Jan 2018 18:52, Denys Vlasenko wrote:
> On Mon, Jan 29, 2018 at 5:55 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> >> >> >> I wish bash wouldn't introduce gratuitous standard violations.
> >> >> >
> >> >> > bash is its own shell.  why can't it introduce its own extensions as it sees
> >> >> > fit ?
> >> >>
> >> >> Because a divergence is not a good thing, especially if it's gratuitous
> >> >
> >> > this position makes no sense.  are you saying that no shell should be allowed
> >> > to extend the syntax however it wants ?  every shell out there should only be
> >> > allowed to implement POSIX and nothing else ?
> >>
> >> The extensions which add some significantly useful functionality are ok.
> >> Example: arrays.
> >>
> >> Changes which don't really add such functionality do more harm than good.
> >> Example: "function" keyword in bash made it possible to do this:
> >
> > in general, i think you're applying 20/20 hindsight to things.  it's easy to
> > say something is a bad idea years after the fact with experience in hand.
> 
> The general observation that "compatibility is a good thing
> and should not be broken just for the fun of it" is very old.
> It's _good_ when you move your stuff from system to system,
> from distro to distro, from one OS to another and things not break.
> Or at least break not too severely.

again, 20/20 hindsight.  you're applying this to a time when there was no
real thing as compatibility: compatible with who ?  this other random project
that just started a year or two ago ?  why are they better ?  there were no
distros to move between, and every system was custom built.  it's why POSIX
is such a mess of permission "implementation defined" cases as it tried to
bring some level of sanity to different systems.

> Unfortunately, every new generation of comp-sci students
> needs to learn it the hard way: by breaking it and then feeling the pain.

or they come out with something so much better that people move away from
the previous thing entirely and it dies.

> I still wonder how on Earth Android filesystem ended up not having /bin/sh.
> No one at Google realized that people are using shell scripts
> all over the Unix universe? Or they seriously did not want people
> to run non-Android specific stuff on Android, and *wanted*
> non-android-tailored shell scripts to fail to execute?

i think it's more like you shouldn't be running shell the vast majority of
the time.  systemd showed the numbers to back this up.  so on a resource
constrained system (like Android phones, especially the first ones from over
a decade ago), no shell is better as it forces people to use a constrained
language.  in this case, the init "exec" stuff, or a compiled language like
C or C++.
https://android.googlesource.com/platform/system/core/+/master/init/README.md
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20180129/894d8c80/attachment-0001.asc>


More information about the busybox mailing list