[Yum-devel] [PATCH/RFC] Prepare for skipbroken/Replace already_seen
Tim Lauridsen
tim.lauridsen at googlemail.com
Thu Nov 29 07:08:33 UTC 2007
Florian Festi wrote:
> Hi!
>
> While playing around with the skipbroken code I run into some problems
> when transaction members are removed and the packages is readded later
> on. Reason for this is that __cmp__ and __hash__ methods are
> overloaded in the TransactionMember class. This means that transaction
> members containing pkgs with the same pkgtup are treated as equal.
> Because of this the newly added transaction members are found in the
> already_seen(_removed) dicts if the old "equal" transaction members
> still linger there. A similar problem exists for TsInfo.removedmembers.
>
> The current problem could be worked around by resetting already_seen*
> (as done by Jeremy's patch) and TsInfo.removedmembers (still missing)
> at the begin of the depsolving. But as soon as we try to move the
> skipbroken code deeper into the depsolving loop this will no longer be
> sufficient. Resetting the already_seen information also means
> restarting the depsolving from the start and loosing all the work we
> already did.
>
> The attached patch works around this two problems by moving to a list
> (set) of transaction members that needs to be checked
> (TsInfo._unresolvedMembers) and keeps it up to date. It also removes
> the no longer needed already_seen* dicts and removedmembers attribute
> and related methods.
>
> The new TsInfo.resetResolved() method feature a hard=False default
> behavior that keeps the already done work if this is better than
> starting from scratch which may be the case after big changes (GUI
> applications come to mind).
>
> I am a bit unsure how this implementation would cope with reinstalls
> (adding install and remove transaction members for the same package)
> but IIRC these are not supported in yum anyway and it is currently not
> possible to do such things even from the yum shell. I also guess that
> some other code pieces would need work to support reinstalls.
>
> So my main questions are:
>
> * Does this look sane?
>
> * Are any of the removed pieces part of the "official" yum API and
> need to stay?
>
>
> Florian
> ------------------------------------------------------------------------
>
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at linux.duke.edu
> https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
Look good to me.
maybe it was a good idea to make some unit test to test TransactionData,
so it is easy to test that basic operations are work as expected.
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.baseurl.org/pipermail/yum-devel/attachments/20071129/d9ddae11/attachment.htm
More information about the Yum-devel
mailing list