Get all potential matches for deps, let install time figure

the best one to use.

Remove code stolen from anaconda as it isnt needed anymore.
This may bloat the compose, but we need the multiarch stuff
and potential matches so that install time can figure out what
to use.
This commit is contained in:
Jesse Keating 2007-03-15 14:17:53 -04:00 committed by Jesse Keating
parent a0562d7c20
commit 997c6bdf15
2 changed files with 3 additions and 26 deletions

View File

@ -2,6 +2,8 @@
- Use yum's built in exclude handling
- Use yum's built in conditional handling for things from comps
- Do excludes before group handling.
- Get all potential matches for deps, let install time figure
the best one to use.
* Tue Mar 14 2007 Jesse Keating <jkeating@redhat.com>
- Do things faster/smarter if we've only asked for one disc

View File

@ -71,31 +71,6 @@ class Gather(yum.YumBase):
# the logging.
pass
def _provideToPkg(self, req): #this is stolen from Anaconda
"""Return a list of best possible providers for a requirement.
Returns a list or None"""
bestlist = None
(r, f, v) = req
satisfiers = []
for po in self.whatProvides(r, f, v):
# if we already have something installed which does the provide
# then that's obviously the one we want to use. this takes
# care of the case that we select, eg, kernel-smp and then
# have something which requires kernel
if self.tsInfo.getMembers(po.pkgtup):
return [po]
if po not in satisfiers:
satisfiers.append(po)
if satisfiers:
bestlist = self.bestPackagesFromList(satisfiers, arch=self.compatarch)
return bestlist
return None
def getPackageDeps(self, po):
"""Return the dependencies for a given package, as well
possible solutions for those dependencies.
@ -119,7 +94,7 @@ class Gather(yum.YumBase):
if req in provs:
continue
deps = self._provideToPkg(req)
deps = self.whatProvides(r, f, v).returnPackages()
if deps is None:
self.logger.warning("Unresolvable dependency %s in %s" % (r, po.name))
continue