[pacman-dev] [PATCH] Remove use of `seq` in pactree

Dan McGee dpmcgee at gmail.com
Thu Oct 7 17:13:50 EDT 2010


On Thu, Oct 7, 2010 at 4:03 PM, Daenyth Blank <daenyth+arch at gmail.com> wrote:
> On Thu, Oct 7, 2010 at 16:52, Dan McGee <dan at archlinux.org> wrote:
>> This is not a bash builtin, so can potentially cause portability issues.
>> Additionally, the use of it is completely unnecessary as it can all be done
>> within bash (and done faster).
>>
>> $ time pactree xfwm4 >/dev/null (old version)
>> real    0m3.245s
>>
>> $ time ./contrib/pactree xfwm4 >/dev/null (new version)
>> real    0m3.042s
>>
>> Signed-off-by: Dan McGee <dan at archlinux.org>
>> ---
> If we accept a dependency on bash >= 4, we can further reduce that all
> to a brace expansion:
> daenyth at Bragi ~ $ echo {01..10}
> 01 02 03 04 05 06 07 08 09 10

We don't.

-Dan

[1] http://projects.archlinux.org/pacman.git/commit/?id=c2cf6a14cf44400d0ef249b38d37eb04d3424bf4
[2] http://projects.archlinux.org/pacman.git/commit/?id=8b23aa172f6229dd82c381704d4802d9747e118b


More information about the pacman-dev mailing list