Mailinglist Archive: opensuse-factory (401 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?
  • From: Joerg Schilling <Joerg.Schilling@xxxxxxxxxxxxxxxxxxx>
  • Date: Thu, 14 Mar 2019 10:42:56 +0100
  • Message-id: <5c8a2220.VxXlZ4zFJ/VC0n7g%Joerg.Schilling@fokus.fraunhofer.de>
Thorsten Kukuk <kukuk@xxxxxxx> wrote:

The problem is the installation dependency cycle:
- bash requires update-alternatve
- update-alternative requires bash

If you install bash first, the update-alternative call in the %post
section will fail and there is no /bin/sh.

This is not a problem as long as you install bash as /bin/bash and include bash
in a packet that does not depend on things that bas does not need to depend on.

What I'm still missing is: what is the advantage to be able to
replace /bin/sh with something different than bash? bash will be
installed anyways, there is no way to install an openSUSE without
bash, there are too many core packages requiring /bin/bash.

Other shells are e.g. faster and this could speed up the boostrap process.
bosh is typically 20% faster than bash and still 4% faster than dash even
though bosh implements the POSIX required support for multi byte characters.

In general, it is a nice idea to prevent people from introducing constructs
into a "#!/bin/sh script" that are not granted to be in a shell since in
general it is no longer a correct assumption to have bash in /bin/sh on Linux.

In other words: performance and portability is enhanced by such a decision.

Jörg

--
EMail:joerg@xxxxxxxxxx (home) Jörg Schilling D-13353 Berlin
joerg.schilling@xxxxxxxxxxxxxxxxxxx (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >