From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XbR7S-0001jk-Ot for ptxdist@pengutronix.de; Tue, 07 Oct 2014 11:31:46 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1XbR7S-0000jk-NQ for ptxdist@pengutronix.de; Tue, 07 Oct 2014 11:31:46 +0200 Date: Tue, 7 Oct 2014 11:31:46 +0200 From: Michael Olbrich Message-ID: <20141007093146.GB18049@pengutronix.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [ptxdist] BASH_FUNC_set_shell_label() not a valid identifier Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de 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_()' -> '' 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