I'm not entirely sure this is the right fix, but it does work :). The
problem has been seen when:

1. A multilib package, like gtk2.i386, needs to be installed.
2. The other parts, like gtk2.x86_64, are already installed.
3. That depends on another package, like hicolor-icon-theme.
4. That package isn't installed (in my situation this seems to be a bug
in anaconda).

...at which point although the dep. can be "found" for gtk2.i386 yum
can't find it for the currently installed gtk2.x86_64 (because it isn't)
and so refuses to continue. 
 The basic approach was that if X is installed and depends on Y, then
don't fail as long as Y _can_ be installed (and it asks for it to be
installed, I think).
 Any comments?

 I've attached it and it can be merged from:

git pull http://people.redhat.com/jantill/gits/yum pkg-req-not-inst

 Or all my current patches can be merged from:

git pull http://people.redhat.com/jantill/gits/yum james

-- 
James Antill <[EMAIL PROTECTED]>
diff --git a/yum/depsolve.py b/yum/depsolve.py
index 610cb75..13a58a7 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -368,6 +368,14 @@ class Depsolve(object):
         else:
             self.verbose_logger.log(logginglevels.DEBUG_2, 'Needed Require is not a package name. Looking up: %s', niceformatneed)
             providers = self.rpmdb.whatProvides(needname, needflags, needversion)
+            if not len(providers):
+                self.verbose_logger.log(logginglevels.DEBUG_2, 'Needed Require is not installed. Looking up: %s', niceformatneed)
+                rproviders = self.whatProvides(needname, needflags, needversion)
+                for rpkg in rproviders:
+                    providers.append((rpkg.name, rpkg.arch, rpkg.epoch, rpkg.version, rpkg.release))
+                if len(providers): # req isn't already installed, but should be
+                    needmode = 'i'
+
             
         for insttuple in providers:
             inst_str = '%s.%s %s:%s-%s' % insttuple

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to