Some comments on the patch: Florian Festi wrote: > ------------------------------------------------------------------------ > > ? anaconda.prof.0 > Index: rpmUtils/miscutils.py > =================================================================== > RCS file: /cvsroot/yum/cvs/yum/rpmUtils/miscutils.py,v > retrieving revision 1.21 > diff -u -r1.21 miscutils.py > --- rpmUtils/miscutils.py 7 Apr 2007 18:23:15 -0000 1.21 > +++ rpmUtils/miscutils.py 25 Apr 2007 16:16:29 -0000 > @@ -155,6 +155,68 @@ > return 1 > return 0 > > +def rangeCompare(reqtuple, provtuple):
Could this share any code with the existing rangeCheck? > =================================================================== > RCS file: /cvsroot/yum/cvs/yum/yum/sqlitesack.py,v > retrieving revision 1.96 > diff -u -r1.96 sqlitesack.py > --- yum/sqlitesack.py 24 Apr 2007 21:13:06 -0000 1.96 > +++ yum/sqlitesack.py 25 Apr 2007 16:16:30 -0000 > @@ -413,6 +414,62 @@ > pkgs.append(ob) > > return pkgs > + > + > + def _search(self, prcotype, name, flags, version): > + if flags == 0: > + flags = None > + if type(version) in (str, type(None), unicode): > + req = (name, flags, rpmUtils.miscutils.stringToVersion( > + version)) > + elif type(version) in (tuple, list): # would this ever be a list? > + req = (name, flags, version) > + > + result = [ ] > + > + for (rep,cache) in self.primarydb.items(): > + cur = cache.cursor() > + executeSQL(cur, "select packages.*, %s.name as n, %s.flags as f, > " > + "%s.epoch as e, %s.version as v, %s.release as r " > + "from %s,packages " > + "where %s.name = ? and " > + "%s.pkgKey=packages.pkgKey" % > + ((prcotype,) * 8), > + (name,)) > + for x in cur: > + val = (x[-5], x[-4], x[-3:]) > + if rpmUtils.miscutils.rangeCompare(req, val): > + result.append(self.pc(rep,x)) I think there is a missing check for if self._excluded here. It would also be neat if _search and searchPrco could share some code, too. -James
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Yum-devel mailing list [email protected] https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
