Index: yum/__init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.317
retrieving revision 1.320
diff -u -r1.317 -r1.320
--- yum/__init__.py 8 Apr 2007 15:59:59 -0000 1.317
+++ yum/__init__.py 18 Apr 2007 23:38:02 -0000 1.320
@@ -307,7 +307,7 @@
def _getRepos(self, thisrepo=None, doSetup = False):
"""grabs the repomd.xml for each enabled repository and sets up
the basics of the repository"""
-
+
if not self._repos:
self._repos = RepoStorage()
# Get our list of repo objects from conf, add them to the repos collection
@@ -353,9 +353,6 @@
"""populates the package sacks for information from our repositories,
takes optional archlist for archs to include"""
- if self._pkgSack:
- return self._pkgSack
-
if self._pkgSack and thisrepo is None:
self.verbose_logger.log(logginglevels.DEBUG_4,
'skipping reposetup, pkgsack exists')
@@ -429,6 +426,7 @@
warnings.warn('doGroupSetup() will go away in a future version of Yum.\n',
Errors.YumFutureDeprecationWarning, stacklevel=2)
+ self.comps = None
return self._getGroups()
def _setGroups(self, val):
@@ -1767,8 +1765,16 @@
pkgs = pkgSack.returnNewestByName()
del(pkgSack)
+ pkgbyname = {}
+ for pkg in pkgs:
+ if not pkgbyname.has_key(pkg.name):
+ pkgbyname[pkg.name] = [ pkg ]
+ else:
+ pkgbyname[pkg.name].append(pkg)
+
lst = []
- lst.extend(self.bestPackagesFromList(pkgs))
+ for pkgs in pkgbyname.values():
+ lst.extend(self.bestPackagesFromList(pkgs))
pkgs = lst
if len(pkgs) == 0:
@@ -1779,7 +1785,7 @@
# FIXME - lots more checking here
# - install instead of erase
# - better error handling/reporting
-
+
tx_return = []
for po in pkgs:
if self.tsInfo.exists(pkgtup=po.pkgtup):