[Yum-devel] [PATCH] Remove yum-metadata-parser from the default run_with_package_names list
Tim Lauridsen
tim.lauridsen at googlemail.com
Wed Oct 14 09:02:31 UTC 2009
On 10/13/2009 07:14 PM, Seth Vidal wrote:
>
>
> On Tue, 13 Oct 2009, James Antill wrote:
>
>> self.plugins.run('pretrans')
>>
>> + # We may want to put this other places, eventually, but for
>> now it's
>> + # good as long as we get it right for history.
>> + for repo in self.repos.listEnabled():
>> + if repo._xml2sqlite_local:
>> + self.run_with_package_names.add('yum-metadata-parser')
>> + break
>> +
>
>
> maybe something like:
>
> if True in [r._xml2sqlite_local for r in self.repos.listEnabled()]:
> self.run_with_package_names.add('yum-metadata-parser')
>
> might be quicker?
Have eaten som weird mushroom :)
I like the original way better , list comprehensions are good for
generating lists i some cases, but this is not one of them :(
If you want stange stuff like this then use (r._xml2sqlite_local for r
in self.repos.listEnabled()) as James pointed out for me the other day,
it is a generator, so it will not build all the values first and then
loop, it yield one value at a time.
maybe adding the lines to a _is_xml_metadata funtion will add readability.
Tim
More information about the Yum-devel
mailing list