Summary: | BSD patch broke strip-linguas | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Harald van Dijk (RETIRED) <truedfx> |
Component: | Eclasses | Assignee: | SpanKY <vapier> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alt, radek |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/eutils.eclass?r1=1.225&r2=1.226 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | patch |
Description
Harald van Dijk (RETIRED)
![]() Created attachment 87707 [details, diff]
patch
executing `basename` is just retarded as it slows things down i merged the find/hasq changes but i dont quite get this: - for d in "$@" ; do + for d ; do > i merged the find/hasq changes but i dont quite get this:
> - for d in "$@" ; do
> + for d ; do
in "$@" is implied if nothing is given after the variable name, there's no need to state it. in "$@" works as well, so if you'd rather leave it, that's fine too; style can be discussed without ever agreeing :)
for d ; do isnt very intuitive things should be fixed in cvs now ... if you feel like rewriting it so it doesnt -exec basename, i'd be happy ;) Giving the basename's work to sed might help a lot. See some tests: # ls=$(find /usr/portage -name '*.ebuild' -exec basename {} .ebuild \;) real 0m14.910s # ls=$(find /usr/portage -name '*.ebuild' | sed 's:.*/\([^/]*\).ebuild:\1:') real 0m1.169s (In reply to comment #2) > executing `basename` is just retarded as it slows things down > Hmm, but a much more retarded than this would be the old instruction "ls=${ls//.po}", present in r1.235, which could lock up bash if it had a lot of work to do. > Giving the basename's work to sed might help a lot. See some tests: i dont really undertand this sentence, but using sed seems like it'd be kind of a pain to extra all the right data > Hmm, but a much more retarded than this would be the old instruction > "ls=${ls//.po}", present in r1.235, which could lock up bash if it had a lot > of work to do. if by "a lot of work" you mean "ls is a string whose length is many kilobytes long", then yes you are correct but considering that use case is in the realm of very very unlikely, your point has not value |