[Yum-devel] New yum commandline option
seth vidal
skvidal at linux.duke.edu
Wed Jan 11 07:21:19 UTC 2006
> I agree, i have made a new patch.
> i had to add something to
> yum.repos.RepoStorage.enableRepo and yum.repos.RepoStorage.disableRepo to handle the case where
>
> repoid = freshrpms,dries (no wildcards)
>
> i have tested it with this command:
>
> ./yummain.py --disablerepo=\* --enablerepo=devel*,extras-dev* grouplist
>
> it disables : base,updates-released,extras,livna (enabled in the repo files)
> and enables : development and extras-development
I merged a variation on this patch.
a couple of things about it:
1. you don't need to break out the items first - you can do it all in a
loop around it and it makes the code easier.
2. string.find(',') will always be something other than None or False.
It returns -1 if it can't find the item you're searching for. So if
foo.find(',') will always be true. We need "if foo.find(',') != -1"
3. you have to strip each object of preceeding and following spaces once
you split the input pattern. Otherwise a string like: --enablerepo="foo,
bar, baz" returns 3 items:
'foo'
' bar'
' baz'
otherwise the patch has been merged, thanks!
-sv
More information about the Yum-devel
mailing list