[Mageia-dev] [soft-commits] [3526] make clean-rpmsrate 11. 5% faster on average on cached repo directory by
Thierry Vignaud
thierry.vignaud at gmail.com
Thu Mar 15 20:27:53 CET 2012
On 15 March 2012 20:20, Pascal Terjan <pterjan at gmail.com> wrote:
>> Modified: mgatools/trunk/clean-rpmsrate
>> ===================================================================
>> --- mgatools/trunk/clean-rpmsrate 2012-03-15 19:13:00 UTC (rev 3525)
>> +++ mgatools/trunk/clean-rpmsrate 2012-03-15 19:13:03 UTC (rev 3526)
>> @@ -18,6 +18,9 @@
>>
>> my %rpm;
>> foreach my $dir (@ARGV) {
>> - $rpm{$dir} = [ map { s!$dir/?(.*)\.rpm$!$1!; $_ } glob "$dir/*.rpm" ];
>> + chdir($dir);
>> + $rpm{$dir} = [ map { s!(.*)\.rpm$!$1!; $_ } glob "*.rpm" ];
>
> What about s!\.rpm$!! ?
Indeed we can simplify further :-)
More information about the Mageia-dev
mailing list