[Yum-devel] Plugins can now modify and query Yum's command line

Menno Smits menno-yum at freshfoo.com
Fri May 13 06:58:58 UTC 2005


seth vidal wrote:
> I looked through these changes in some detail this evening. I was
> worried about the --enablerepo/--disablerepo ordering as well as a
> number of other items. But after reading through the changes and seeing
> how the code lays out it looks quite good. What does it do if the user
> tries to duplicate an existing command line option?

Yum's built-in options are defined first. If later add_option() calls 
cause a conflict, the OptionParser instance will raise an 
OptionConflictError. This also exposes the situation of multiple plugins 
who's options conflict with each other. I think this is desirable 
behaviour because catches the problem as early as possible.

However, there's nothing to stop a plugin removing a pre-existing option 
and then adding it's own replacement but at this point I stop caring :)

Menno





More information about the Yum-devel mailing list