[Yum-devel] Yum CLI/API consistency

Paul Nasrat pnasrat at redhat.com
Mon Jan 23 17:14:27 UTC 2006


Seth, 

You asked for some feedback about this sort of stuff so here's one case
I think I should mention.

Currently we have a bunch of logic in cli.py which really should be
handled by the YumBase.install() YumBase.update() and YumBase.remove()
functions.

End goal - as a user I want to install everything[0]:

cli: yum install *
API: yum.install('*')

Currently cli uses packages.parsePackages, where YumBase.install uses
searchNEVRA. The attached proof of concept patch makes install('*') work
by taking advantage of sqlite's GLOB (we'd need to make non sqlite sacks
work in the same manner).  Obviously we could also hand off to
parsePackages if we see a glob instead, but I think that using sqlite
GLOB is probably better.

I think we should be moving logic from cli.py to the methods in the
YumBase object.  So that for non cli/pwd interactive things we pass off
to YumBase.install().  Does this sound reasonable - I'll try and get a
more complete patch done and clean up cli.py.

Paul

[0] For some bizarre reason.  Maybe vim* would be a better example.
This would mean in ks.cfg %packages we could support globs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-2.5.1.globs.patch
Type: text/x-patch
Size: 1967 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20060123/fda7fccb/attachment.bin 


More information about the Yum-devel mailing list