Web lists-archives.com

Re: alias in maintainer scripts?




On Fri, Mar 02, 2018 at 04:15:18AM +0300, KAction@xxxxxxx wrote:
> 
> [2018-03-01 22:54] Ralf Treinen <treinen@xxxxxxx>
> > should we really allow for the usage of alias in maintainer scripts? 
> > 
> > Policy 10.4 says that /bin/sh scripts may assume an interpreter
> > that implements the POSIX standard, plus some additional features
> > listed in the policy. And the POSIX standards describes alias
> > substitution in shell scripts [1], so it seems we currently do
> > allow for it.
> > 
> > However, /bin/sh may be linked to bash, and bash does alias substitution
> > only when in interactive mode but not in batch mode [2]. That is, unless
> > a special bash option is set.
> >
> > Hence, maintainer scripts relying on alias substitution will not work
> > correctly when /bin/sh is bash. 
> 
> Is it true? When invoked as /bin/sh, GNU Bash works in Posix-emulation
> mode, and it is not that bad:

Indeed, Bash manual section 6.11. Thanks for pointing this out, so
aliases are not issue for us.

-Ralf.