[Yum-devel] yumBase using properties
seth vidal
skvidal at linux.duke.edu
Wed Feb 21 07:34:53 UTC 2007
Hi all,
The attached patch adds as properties most of the big yum base
attributes.
This should allow us to clean up all the random:
self.doRepoSetup()
self.doRpmDBSetup()
self.doSackSetup()
calls that are all over the code.
essentially now, if you just want the default configuration you can do:
import yum
my = yum.YumBase()
my.pkgSack.returnNevra(name='yum')
my.rpmdb.returnNevra(name='yum')
and it will work
calls to rpmdb will create the ts object and the conf object.
calls to pkgSack will create the repos and conf objects immediately
using the defaults of doRepoSetup() and doConfigSetup()
it's still possible for you to create these individually with special
options you just have to run them first.
Things not done:
- I've not made properties of: comps or up, yet. That's only b/c it is
late and I am sleepy.
anyway - let me know what you think and if we like it, I'll commit it.
-sv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-with-properties.patch
Type: text/x-patch
Size: 12585 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070221/de51406e/attachment.bin
More information about the Yum-devel
mailing list