[Yum-devel] a lot of api breaking, I think

seth vidal skvidal at linux.duke.edu
Thu Jan 26 23:32:16 UTC 2006


Menno and I were talking about making package objects more useful and
letting them handle simple things internally like
package_object.return_to_me_your_url()

In order to do that the package_object needs to have a reference to the
repository as an attribute instead of having just the string of the
repoid. 

Menno mentioned that it would actually make each package object a bit
smaller b/c references are smaller, in memory, than a string, as an
attribute. However, to make this change will mean a lot of things will
stop working, from a quick grep through the code.

So a couple of options that should work:

1. suck it up, search through all our code and make the changes
2. figure out if the __str__ comparison in the repo object is enough to
handle most of the comparisons needed.
3. define a new attribute in the package object called 'repo' and
deprecate 'repoid' for use. Then, as we work through the code prune out
all the references to packageobject.repoid

I kinda like 3 - even though it would make it a bit bigger for a little
while.


What is everyone's thoughts?

-sv





More information about the Yum-devel mailing list