Support cross-testing (version 3)
Joseph S. Myers
joseph@codesourcery.com
Fri Nov 2 17:44:00 GMT 2012
On Fri, 2 Nov 2012, Andreas Schwab wrote:
> > +# Unset all variables from the blacklist. Then echo all exported
> > +# variables. The 'export -p' command adds backslashes for environment
> > +# variables which contain newlines.
> > +blacklist_exports ()
> > +{
> > + (unset ${env_blacklist}; export -p) | remove_newlines
>
> If called by bash, export -p outputs series of declare -x commands,
> which will fail if the remote /bin/sh is not bash.
"declare -x" was meant to be replaced by "export" in the post-processing
of "export -p" output, but it seems that got lost when revising the
script. (That post-processing isn't, I think, actually safe in general
for environment variables whose values contain newlines; it was meant to
be an optimization, but I'd be happy for it to be removed and for
environment settings with newlines between successive "export" commands
just to be passed as-is to the remote system.)
> (bourne_quote): Remove use of local.
bourne_quote is still bash-specific unless you redo the
${arg//\'/\'\\\'\'} used for quoting.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list