mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] BASH_FUNC_set_shell_label() not a valid identifier
Date: Tue, 7 Oct 2014 11:31:46 +0200	[thread overview]
Message-ID: <20141007093146.GB18049@pengutronix.de> (raw)
In-Reply-To: <CAMwGMjzHeTLm7q2+DiLVFg604VvAyhm8pYpYqBOqeC2kwBS2xg@mail.gmail.com>

Hi,

On Sun, Oct 05, 2014 at 12:47:49AM -0400, Jon Ringle wrote:
> Recently I've started to see the following message every time I invoke
> ptxdist:
> 
> /usr/local/lib/ptxdist-2014.10.0/bin/ptxdist: line 2151: unset:
> `BASH_FUNC_set_shell_label()': not a valid identifier
> 
> The ptxdist code here has:
>     unset $(/usr/bin/env | \
>         sed -n -e "s/^\([^=[:space:]]\+\)=.*$/\1/p" | \
>         egrep -v
> "^(PTXDIST_PTXRC|PTX_AUTOBUILD_DESTDIR|CCACHE_.*|PWD|HOME|USER|PATH|TERM|COLUMNS|LINES|DISPLAY|TMPDIR|http_proxy|https_proxy|ftp_proxy|no_proxy${whitelist})$"
> )
> 
> I'm not sure why I'm getting this message, but speculatively it seems to
> have started appearing after I updated Ubuntu-14.04 with bash shellshock
> patches... ?
> 
> Anyone else see this type of message?

$ some_function() { echo foo; }
$ export -f some_function

Debian/sid (with shellshock patches):

$ bash --version
GNU bash, version 4.3.27(1)-release (x86_64-pc-linux-gnu)
[...]
$ env
[...]
some_function=() {  echo foo
}
[...]

Debian/wheezy (with shellshock patches):

$ bash --version
GNU bash, version 4.2.37(1)-release (i486-pc-linux-gnu)
$ env
[...]
BASH_FUNC_some_function()=() {  echo foo
}
[...]

Not nice :-/. So we need to convert 'BASH_FUNC_<something>()' ->
'<something>' before calling 'unset'.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

      parent reply	other threads:[~2014-10-07  9:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-05  4:47 Jon Ringle
2014-10-06  8:07 ` Alexander Dahl
2014-10-06  8:32   ` Bruno Thomsen
2014-10-06  9:19     ` Tim Sander
2014-10-09  7:50       ` Spriggs, Jim
2014-10-09 16:50         ` Jon Ringle
2014-10-07  9:31 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141007093146.GB18049@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox