[Yum-devel] [PATCH] make skipbroken handle multiple TS_UPDATED members
Seth Vidal
skvidal at fedoraproject.org
Wed Sep 16 15:47:40 UTC 2009
On Wed, 16 Sep 2009, Tim Lauridsen wrote:
> On 09/16/2009 04:20 PM, Seth Vidal wrote:
>> Do you have to iterate across all the pkgs in the ts to do that?
>> Couldn't you reduce the set you're going across to only pkgs which are
>> going to be updated or obsoleted?
>>
>
> What about this change ?
>
> diff --git a/yum/__init__.py b/yum/__init__.py
> index c8f1687..869f8ac 100644
> --- a/yum/__init__.py
> +++ b/yum/__init__.py
> @@ -922,6 +922,8 @@ class YumBase(depsolve.Depsolve):
> then make sure that all the TS_UPDATED get removed.
> """
> for txmbr in self.tsInfo:
> + if not txmbr.output_state == TS_UPDATED:
> + continue
> for pkg in txmbr.updated_by:
> # check if the updating txmbr is in the transaction
> # else remove the updated txmbr
>
I was thinking something like:
for txmbr in self.tsInfo.getMembersWithState(None, [TS_UPDATED, TS_OBSOLETED]):
does that make sense?
-sv
More information about the Yum-devel
mailing list