* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-util/eclipse-sdk: eclipse-sdk-3.2.1-r2.ebuild ChangeLog eclipse-sdk-3.3.1.1.ebuild
[not found] <E1JGvZD-00021V-R4@stork.gentoo.org>
@ 2008-01-21 22:12 ` Donnie Berkholz
2008-01-22 0:23 ` Ryan Hill
0 siblings, 1 reply; 5+ messages in thread
From: Donnie Berkholz @ 2008-01-21 22:12 UTC (permalink / raw
To: gentoo-dev, elvanor
On 12:15 Mon 21 Jan , Jean-Noel Rivasseau (elvanor) wrote:
> 1.1 dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1.ebuild
>
> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1.ebuild?rev=1.1&view=markup
> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1.ebuild?rev=1.1&content-type=text/plain
> src_unpack() {
> unpack "${A}"
> patch-apply
> remove-bundled-stuff
>
> # No warnings / Java 5 / all output should be directed to stdout
> find "${S}" -type f -name '*.xml' -exec \
> sed -r -e "s:(-encoding ISO-8859-1):\1 -nowarn:g" -e "s:(\"compilerArg\" value=\"):\1-nowarn :g" \
> -e "s:(<property name=\"javacSource\" value=)\".*\":\1\"1.5\":g" \
> -e "s:(<property name=\"javacTarget\" value=)\".*\":\1\"1.5\":g" -e "s:output=\".*(txt|log).*\"::g" -i {} \;
I think this will end up calling sed a large number of times, since
-exec runs per file found instead of once on all files. If you instead
pipe find output to xargs sed, that might work better. Depending on how
many files are involved, this could be a significant difference.
Thanks,
Donnie
--
gentoo-dev@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-util/eclipse-sdk: eclipse-sdk-3.2.1-r2.ebuild ChangeLog eclipse-sdk-3.3.1.1.ebuild
2008-01-21 22:12 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-util/eclipse-sdk: eclipse-sdk-3.2.1-r2.ebuild ChangeLog eclipse-sdk-3.3.1.1.ebuild Donnie Berkholz
@ 2008-01-22 0:23 ` Ryan Hill
2008-01-23 19:55 ` Steve Long
0 siblings, 1 reply; 5+ messages in thread
From: Ryan Hill @ 2008-01-22 0:23 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
Donnie Berkholz wrote:
> On 12:15 Mon 21 Jan , Jean-Noel Rivasseau (elvanor) wrote:
>> 1.1 dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1.ebuild
>>
>> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1.ebuild?rev=1.1&view=markup
>> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1.ebuild?rev=1.1&content-type=text/plain
>
>> src_unpack() {
>> unpack "${A}"
>> patch-apply
>> remove-bundled-stuff
>>
>> # No warnings / Java 5 / all output should be directed to stdout
>> find "${S}" -type f -name '*.xml' -exec \
>> sed -r -e "s:(-encoding ISO-8859-1):\1 -nowarn:g" -e "s:(\"compilerArg\" value=\"):\1-nowarn :g" \
>> -e "s:(<property name=\"javacSource\" value=)\".*\":\1\"1.5\":g" \
>> -e "s:(<property name=\"javacTarget\" value=)\".*\":\1\"1.5\":g" -e "s:output=\".*(txt|log).*\"::g" -i {} \;
>
> I think this will end up calling sed a large number of times, since
> -exec runs per file found instead of once on all files. If you instead
> pipe find output to xargs sed, that might work better. Depending on how
> many files are involved, this could be a significant difference.
Better yet, use
find [...] -print0 | xargs -0 sed -r -e [...] -e [...] -i
This handles files with special characters like spaces in their names.
--
fonts, by design, by neglect
gcc-porting, for a fact or just for effect
wxwindows @ gentoo EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-util/eclipse-sdk: eclipse-sdk-3.2.1-r2.ebuild ChangeLog eclipse-sdk-3.3.1.1.ebuild
2008-01-22 0:23 ` Ryan Hill
@ 2008-01-23 19:55 ` Steve Long
2008-01-23 22:31 ` Mike Frysinger
0 siblings, 1 reply; 5+ messages in thread
From: Steve Long @ 2008-01-23 19:55 UTC (permalink / raw
To: gentoo-dev
Ryan Hill wrote:
> Donnie Berkholz wrote:
>> On 12:15 Mon 21 Jan , Jean-Noel Rivasseau (elvanor) wrote:
>>> # No warnings / Java 5 / all output should be directed to stdout
>>> find "${S}" -type f -name '*.xml' -exec \
>>> sed -r -e "s:(-encoding ISO-8859-1):\1 -nowarn:g" -e "s:(\"compilerArg\"
>>> value=\"):\1-nowarn :g" \ -e "s:(<property name=\"javacSource\"
>>> value=)\".*\":\1\"1.5\":g" \ -e "s:(<property name=\"javacTarget\"
>>> value=)\".*\":\1\"1.5\":g" -e "s:output=\".*(txt|log).*\"::g" -i {} \;
>>
>> I think this will end up calling sed a large number of times, since
>> -exec runs per file found instead of once on all files. If you instead
>> pipe find output to xargs sed, that might work better. Depending on how
>> many files are involved, this could be a significant difference.
>
> Better yet, use
>
> find [...] -print0 | xargs -0 sed -r -e [...] -e [...] -i
>
> This handles files with special characters like spaces in their names.
>
Or even: find blah -exec sed 'blah "blah"' +
It's POSIX[1] and it's in GNU too (after a long delay). The quoting there is
a bit yuck.
http://wooledge.org/mywiki/UsingFind
[1] http://www.opengroup.org/onlinepubs/009695399/utilities/find.html
--
gentoo-dev@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-util/eclipse-sdk: eclipse-sdk-3.2.1-r2.ebuild ChangeLog eclipse-sdk-3.3.1.1.ebuild
2008-01-23 19:55 ` Steve Long
@ 2008-01-23 22:31 ` Mike Frysinger
2008-01-23 23:10 ` Harald van Dijk
0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2008-01-23 22:31 UTC (permalink / raw
To: gentoo-dev; +Cc: Steve Long
[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]
On Wednesday 23 January 2008, Steve Long wrote:
> Ryan Hill wrote:
> > Donnie Berkholz wrote:
> >> On 12:15 Mon 21 Jan , Jean-Noel Rivasseau (elvanor) wrote:
> >>> # No warnings / Java 5 / all output should be directed to stdout
> >>> find "${S}" -type f -name '*.xml' -exec \
> >>> sed -r -e "s:(-encoding ISO-8859-1):\1 -nowarn:g" -e
> >>> "s:(\"compilerArg\" value=\"):\1-nowarn :g" \ -e "s:(<property
> >>> name=\"javacSource\" value=)\".*\":\1\"1.5\":g" \ -e "s:(<property
> >>> name=\"javacTarget\" value=)\".*\":\1\"1.5\":g" -e
> >>> "s:output=\".*(txt|log).*\"::g" -i {} \;
> >>
> >> I think this will end up calling sed a large number of times, since
> >> -exec runs per file found instead of once on all files. If you instead
> >> pipe find output to xargs sed, that might work better. Depending on how
> >> many files are involved, this could be a significant difference.
> >
> > Better yet, use
> >
> > find [...] -print0 | xargs -0 sed -r -e [...] -e [...] -i
> >
> > This handles files with special characters like spaces in their names.
>
> Or even: find blah -exec sed 'blah "blah"' +
> It's POSIX[1] and it's in GNU too (after a long delay). The quoting there
> is a bit yuck.
> http://wooledge.org/mywiki/UsingFind
we specifically discourage `find -exec` in favor of `find -print0 | xargs -0`
because it sucks. if your system doesnt support `find -print0` or
`xargs -0`, then you need to install GNU findutils. or install a real OS.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-util/eclipse-sdk: eclipse-sdk-3.2.1-r2.ebuild ChangeLog eclipse-sdk-3.3.1.1.ebuild
2008-01-23 22:31 ` Mike Frysinger
@ 2008-01-23 23:10 ` Harald van Dijk
0 siblings, 0 replies; 5+ messages in thread
From: Harald van Dijk @ 2008-01-23 23:10 UTC (permalink / raw
To: gentoo-dev
On Wed, Jan 23, 2008 at 05:31:13PM -0500, Mike Frysinger wrote:
> On Wednesday 23 January 2008, Steve Long wrote:
> > Or even: find blah -exec sed 'blah "blah"' +
>
> we specifically discourage `find -exec` in favor of `find -print0 | xargs -0`
> because it sucks.
In what way? I'm not aware of any problems with find -exec ... {} + that
are handled any better by find -print0 | xargs -0. It's too bad that you
can only add {} + at the very end of the command, but that's just as
much a problem with xargs -0.
Your reply didn't make it clear, but you're aware of the difference
between -exec {} ; and -exec {} +, right? The former executes a single
command for every file, while the latter builds one long argument list
when possible, the same way xargs does.
--
gentoo-dev@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-23 23:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1JGvZD-00021V-R4@stork.gentoo.org>
2008-01-21 22:12 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-util/eclipse-sdk: eclipse-sdk-3.2.1-r2.ebuild ChangeLog eclipse-sdk-3.3.1.1.ebuild Donnie Berkholz
2008-01-22 0:23 ` Ryan Hill
2008-01-23 19:55 ` Steve Long
2008-01-23 22:31 ` Mike Frysinger
2008-01-23 23:10 ` Harald van Dijk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox