Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: bash-4.0 regression heads up (escaped semicolons in subshells)
Date: Sun, 22 Feb 2009 00:44:39
Message-Id: 200902211944.35760.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] Re: bash-4.0 regression heads up (escaped semicolons in subshells) by Mart Raudsepp
1 On Saturday 21 February 2009 19:38:33 Mart Raudsepp wrote:
2 > On Sat, 2009-02-21 at 19:29 -0500, Mike Frysinger wrote:
3 > > On Saturday 21 February 2009 19:00:19 Mart Raudsepp wrote:
4 > > > On Sat, 2009-02-21 at 18:55 -0500, Mike Frysinger wrote:
5 > > > > On Saturday 21 February 2009 18:38:55 Ryan Hill wrote:
6 > > > > > On Sat, 21 Feb 2009 18:27:10 -0500 Mike Frysinger wrote:
7 > > > > > > looks like bash-4.0 has broken semicolon escaping in subshells.
8 > > > > > > this comes up when using find's -exec like we do in a few places
9 > > > > > > in eclasses: ls=$(find "$1" -name '*.po' -exec basename {} .po
10 > > > > > > \;); shift you can work around the issue in a couple of ways: -
11 > > > > > > quote the semicolon:
12 > > > > > > .... ';')
13 > > > > > > - use backticks
14 > > > > > > `find .... \;`
15 > > > > > >
16 > > > > > > i'll tweak the eclasses to use quoting for now
17 > > > > >
18 > > > > > is this a bug or broken on purpose?
19 > > > >
20 > > > > i say it's a bug, but i'm not the bash maintainer
21 > > > >
22 > > > > i imagine it's fall out from attempts to fix support for case
23 > > > > statements in subshells
24 > > >
25 > > > Then the bug should be fixed, instead of changing usage to something
26 > > > apparently less common, as the conversion could miss some. And more
27 > > > importantly users still want to use \; for find -exec ending on their
28 > > > command line and their very own scripts.
29 > > > And who knows how many shell scripts shipped by packages use the
30 > > > escaping method.
31 > >
32 > > i think you missed the entire point of this thread: there's a bug in
33 > > bash-4.0 that code is likely to hit.
34 >
35 > I think you missed the entire point of my reply.
36 > That bug should be fixed, not workarounds applied all over the tree, as
37 > users still want to be able to escape semi-colons.
38
39 no one suggested doing any of this crap you're talking about. if you want to
40 get all retarded, dont install the masked ebuild. i gave a heads up to people
41 who might want to experiment so they wouldnt have to figure out weird errors.
42 in the mean time, i tweaked a few common files so people wouldnt hit errors
43 and could investigate even further.
44
45 i guess in the future i simply wont post heads up so i dont have to listen to
46 people whine about non-existent issues.
47 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies