Re: bashisems in maintainer scripts.
On Thu, Mar 04, 2004 at 07:59:06PM +0100, Adrian Bunk wrote:
> On Wed, Mar 03, 2004 at 12:41:26AM +0100, David Weinehall wrote:
> > On Tue, Mar 02, 2004 at 07:53:37PM +0100, Petter Reinholdtsen wrote:
> > > [Jeroen van Wolffelaar]
> > > > Why not simply use #!/bin/bash (it's essential), nobody is forced to
> > > > use /bin/sh...
> > > >
> > > > Baf, all problems gone, bashisms are allowed, if it works with bash,
> > > > it works, bash is portable within Debian so problem solved.
> > > >
> > > > Or did I miss something?
> > >
> > > Yes. bash have a bug making it useless as /bin/sh when using LDAP and
> > > /usr/ is a separate partition. See bug #159771 for the details.
> > >
> > > /bin/ash do not have this problem, so that is what we use in
> > > debian-edu. :)
> >
> > Imho it would be a worthy goal in the long run to make bash
> > non-essential (a first step would be to make all maintainer-scripts
> > using /bin/sh posix-compliant, a second-step to make scripts using
> > /bin/bash posix-compliant), but I suppose I'm alone in this.
>
> Some questions:
>
> Why do you want to disallow maintainers to use some more convenient bash
> features?
I don't want to disallow them, I want to make bash non-essential, so
that a base-install doesn't install bash by default, thus allowing for
a smaller base-system, thus forcing the developers who really need them
to depend explicitly on bash.
> How do you plan to make an essential package non-essential without
> breaking anything?
I haven't said it's easy. All scripts that uses bash in their
maintainer-scripts would have to depend on bash, something which would
probably be a nice way of making people not use bash-scripts :-)
The process isn't rocket-science, it's just a very tedious work.
The first part, cleaning away bashisms from /bin/sh-scripts is just
bug-fixing though, the second part, cleaning away bash-scripts and
replacing them with /bin/sh-scripts is something that can be done
without disrupting anything. It's only the final step, making bash
non-essential, that'll require a flag-day...
> Would you really be able to remove bash? Similar to initrd-tools'
> dependency on dash, every package maintainer would always be allowed to
> depend on bash when he wants to use bash in his scripts. This is
Sure. Any maintainer could always depend on whitespace for his
maintainer-scripts too...
> perfectly legal, and any maintainer is allowed to tag a wishlist bug
> asking for using a posix-compliant shell instead of bash as "wontfix".
Yes, but I hope that developers have better taste than that if the only
things that make them use /bin/bash is that they don't bother making a
few simple changes that others happily offer patches to fix.
Regards: David Weinehall
--
/) David Weinehall <tao@acc.umu.se> /) Northern lights wander (\
// Maintainer of the v2.0 kernel // Dance across the winter sky //
\) http://www.acc.umu.se/~tao/ (/ Full colour fire (/
Reply to: