[Yum-devel] [RFC] return value of TransactionInfo.add*
Florian Festi
ffesti at redhat.com
Tue May 27 15:46:14 UTC 2008
Hi!
This is another API issue thta I already tried to address some time ago:
Transaction.add* do not report back what exactly they did. They sometimes
even return a txmbr that did not get added at all. Not to talk about updated
txmbrs and others that might also be the result of the method call. This
causes problems in the depsolver code as it doesn't have a reliable and
simple way to know that is really going on.
The attached patch tried to solve that by returning a dict with different
lists of txmbrs. This dict had to be requested by a special param because of
API compatibility. In general I don't like that solution much. We could now
make it the default to return something more meaning full. I also don't like
the idea of returning a dict very much. I currently think about greating a
new result class. This class could also offer methods like .modified(). The
result class should also be suited to be returned from YumBase.install(),
.update(), .remove() and friends. So we would need a way to collapse several
result objects into one.
I don't have any code yet but want to ask what the general attitude towards
such a change is.
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-make-TransactionInfo.add-return-all-involved-txmbrs.patch
Type: text/x-patch
Size: 7366 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20080527/bc11e9f7/attachment.bin
More information about the Yum-devel
mailing list