[Yum-devel] Re: [yum-cvs] yum-utils yumdownloader.py,1.3,1.4

Menno Smits menno-yum at freshfoo.com
Fri Apr 22 05:21:37 UTC 2005


seth vidal wrote:

>>Allowing plugins to register command line options is a TODO (see the top 
>>of plugins.py).  I want to get this done in the next couple of days.
>>
> 
> 
> I've been thinking about that one a bit - and we might need to consider
> migrating to OptionParser for the cli parsing instead of getopt to add
> options in effectively.

I've started adding support for command line extensions from plugins and 
  its getting ugly. Using the optparse module would definitely clean 
this up.

Problem is, its Python 2.3+ so we end up breaking 2.2 compat (RHEL3 
etc). Could we embed it for a while? (yeah I know)

> That in mind we'll need to make sure we can preserver left-to-right
> processing for things like --disablerepo=* --enablerepo=somerepo

More complex stuff like this can probably be handled with the "callback" 
option action or by extending optparse with a new action class.

Menno



More information about the Yum-devel mailing list