pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_rolling-replace -u ... gives message opt/pkg/bin/pkg_tarup[159]: local: not found [No such file or directory]



On Tue, 08 Jan 2013, Richard PALO wrote:
Therefore, for portability purposes, perhaps the maintainer should check that the shell selected *actually* supports the function local variable declaration with "local", and if not use the posix "typeset".

Is "typeset" really part of POSIX shell language? I thought it was a kshism, and I can't find it in The Open Group Base Specifications Issue 7.

I consider "typeset" less portable than "local". As far as I am aware, neither "typeset" nor "local" is standardised. "local" is supported by almost all shells we care about, except ksh93. "typeset" seems to be supported only by ksh variants, and bash.

I don't know whether pkgsrc relies on being able to use "local" in
shell scripts, but the NetBSD base system does rely on "local", and
refuses to build under a shell that doesn't support "local".

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index