[Yum-devel] Re: [yum-cvs] yum/yum packageSack.py, 1.5, 1.6 rpmsack.py, 1.17, 1.18

Jeremy Katz katzj at redhat.com
Tue Aug 22 17:26:36 UTC 2006


On Mon, 2006-08-21 at 22:54 -0400, Seth Vidal wrote:
> +    def searchPO(self, po):
> +        """return list of package objects matching the name, epoch, ver, rel,
> +           arch of the package object passed in"""
> +        raise NotImplementedError()
> +    
> +    def searchPkgTuple(self, pkgtup):
> +        """return list of pkgobject matching the (n,a,e,v,r) tuple"""
> +        raise NotImplementedError()

Why do we have to have all of these implemented in every subclass?
There's no reason we can't have a default searchPO and searchPkgTuple
that just does a conversion to nevra and returns the result of
searchNevra()

If there's then a convincing reason to implement one separately (ie, you
can get a good speed boost somehow), then we can but at the same time,
we don't make it needlessly complicated to create a new packageSack type

Jeremy




More information about the Yum-devel mailing list