[Yum-devel] parsePackages() vs matchPackageNames()

Tim Lauridsen tim.lauridsen at googlemail.com
Tue Dec 11 10:30:57 UTC 2007


seth vidal wrote:
> It's either too late or night or I'm losing my mind:
> 
> For cases where matching case insensitively nor matching against a
> subset of packages from any given sack are not at issue why are we using
> packages.parsePackages() vs just using sackobject.matchPackageNames()
> 
> Specifically in the cases of:
> 
> install()
> remove()
> update()
> 
> I don't remember having this conversation before so I'm thinking some of
> it just legacy hang-around. I know why parsePackages exists - it's so we
> can case insensitive matches - but we're never going to do that for
> update/install/remove so that doesn't matter. 
> 
> Am I losing my mind?
> 
> -sv
> 

I dived into the code, it looks like the two method is doing the same 
thing, implemented in a little differnt way ( matchPackageNames() is 
using sets and parsePackages() is using directories) and parsePackages() 
has a case sensitivity option.
I did a little searching of the usage of the methods.
Both are used in both cli.py and different yum-utils.

Tim






More information about the Yum-devel mailing list