On Fri, 2009-10-23 at 16:57 +0300, Ville Skyttä wrote: > --- > yum/sqlitesack.py | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py > index 332f3bb..bb2d856 100644 > --- a/yum/sqlitesack.py > +++ b/yum/sqlitesack.py > @@ -1616,6 +1616,9 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack): > # Haven't loaded everything, so _just_ get the pkgtups... > data = self._setupPkgObjList(repoid, patterns, ignore_case) > (need_full, patterns, fields, names) = data > + if names: > + return self.searchNames(patterns) > + > for (repo, x) in self._yieldSQLDataList(repoid, patterns, fields, > ignore_case): > # NOTE: Can't unexclude things...
This can't work as simplePkgList() returns a list of pkgtup, not a list of package objects. Now, in theory, you could do: + if names: + return [pkg.pkgtup for pkg in self.searchNames(patterns)] + ...except this isn't an obvious win, because creating package objects are one of the most expensive things to do ... and to balance that the win we get from using searchNames() is if we can call ._packagesByName(). And we already check for pkgobjlist, so the only real gain is with ._pkgnames_loaded. _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel