>>>>> On Tue, 20 Oct 2015, Mike Frysinger wrote:

> On 21 Oct 2015 00:03, Ulrich Mueller wrote:
>> Therefore I'd make it a recommendation at most. Something along the
>> lines of: "The interpreter is assumed to be GNU bash, version as
>> listed in table xyz, or any later version. If possible, the package
>> manager should set the shell's compatibility level to the exact
>> version specified."

> and include the recommended snippet as well as add a warning about
> not exporting the variable less it break external shell scripts.

"The interpreter is assumed to be GNU bash, version as listed in table
xyz, or any later version. If possible, the package manager should set
the shell's compatibility level to the exact version specified. It
must ensure that any such compatibility settings (e.g. the BASH_COMPAT
variable) are not exported to external programs."

Ulrich


From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <[email protected]>
Date: Wed, 21 Oct 2015 09:31:06 +0200
Subject: [PATCH] Recommend setting the bash compatibility level.

---
 ebuild-format.tex | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/ebuild-format.tex b/ebuild-format.tex
index c741398..6eab1d5 100644
--- a/ebuild-format.tex
+++ b/ebuild-format.tex
@@ -3,11 +3,14 @@
 
 The ebuild file format is in its basic form a subset of the format of a bash 
script. The interpreter
 is assumed to be GNU bash, version as listed in 
table~\ref{tab:system-commands-table} on
-page~\pageref{tab:system-commands-table}, or any later version. The file 
encoding must be UTF-8
-with Unix-style newlines. When sourced, the ebuild must define certain 
variables and functions
-(see sections~\ref{sec:ebuild-vars} and~\ref{sec:ebuild-functions} for 
specific information), and
-must not call any external programs, write anything to standard output or 
standard error, or modify
-the state of the system in any way.
+page~\pageref{tab:system-commands-table}, or any later version. If possible, 
the package manager
+should set the shell's compatibility level to the exact version specified. It 
must ensure that any
+such compatibility settings (e.g. the \t{BASH\_COMPAT} variable) are not 
exported to external programs.
+
+The file encoding must be UTF-8 with Unix-style newlines. When sourced, the 
ebuild must define
+certain variables and functions (see sections~\ref{sec:ebuild-vars} 
and~\ref{sec:ebuild-functions}
+for specific information), and must not call any external programs, write 
anything to standard
+output or standard error, or modify the state of the system in any way.
 
 % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
 
-- 
2.6.2

Attachment: pgpQGua_ruCSI.pgp
Description: PGP signature

Reply via email to