[Yum-devel] YumBaseCli and yum-utils

Tim Lauridsen tim at rasmil.dk
Tue Nov 7 18:39:43 UTC 2006


seth vidal wrote:
> On Tue, 2006-11-07 at 09:35 +0100, Tim Lauridsen wrote:
>   
>> seth vidal wrote:
>>     
>>> Hey,
>>>  for some of the yum-utils would it make sense to use the YumBaseCli
>>> object instead of the YumBase object? Then we could do things that
>>> present info to the user and get user feedback w/o having to recreate
>>> all of it in the util.
>>>
>>> ie: look at how package-cleanup does the old kernel removal.
>>>
>>> it seems like it'd be easier just to grab the equivalent pieces from cli
>>> by using them.
>>>
>>> See a simple dupes-cleaner as attached.
>>>
>>> -sv
>>>
>>>   
>>>       
>> I would be nice if it was possible to reuse the optparser stuff definded 
>> in YumBaseCli.getOptionsConfig, so a yum-util could inherit the basic 
>> command line option like -C, -c ,--noplugins, -y etc.
>> it could be done by splitting YumBaseCli.getOptionsConfig into 3 methods.
>>     
>
> a while back I proposed making a yum-utils module so we could just
> import some standard items from a single location for all the utils that
> can use it.
>
> That might be a place to go for the above.
>
>   
>> The yum-util could then
>> 1. Call the preConfigSetup if it want to inherit the base yum options
>> 2. Add some more options.
>> 3. do it own doConfigSetup()
>> 4. Call the postConfigSetup()
>> 5. Do actions for the utils own options.
>>     
>
> agreed.
>
> care to put a prototype together? Then maybe we can start splitting up
> and redoing the tools. Hell, it'd be good b/c we could fix up some old
> cruft in a lot of the utils anyway.
>
>   

I will try to cook something together.

Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.baseurl.org/pipermail/yum-devel/attachments/20061107/537274c5/attachment.htm 


More information about the Yum-devel mailing list