[Yum-devel] [PATCH] oddball case where rpm coughed up an EMPTY provides entry.

Seth Vidal skvidal at fedoraproject.org
Thu May 13 15:17:31 UTC 2010


I think it is safe to ignore and skip empty provides. This code
lets that happen and makes sure that string_to_prco_tuple raises
properly
---
 yum/depsolve.py |    4 ++++
 yum/misc.py     |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/yum/depsolve.py b/yum/depsolve.py
index 17b2ce9..b8fa6ad 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -855,6 +855,8 @@ class Depsolve(object):
         for req in sorted(txmbr_reqs, key=self._sort_req_key):
             if req[0].startswith('rpmlib('):
                 continue
+            if not req[0]:
+                continue
             if req in oldreqs and self.rpmdb.getProvides(*req):
                 continue
             
@@ -897,6 +899,8 @@ class Depsolve(object):
                 continue
             if prov in newpoprovs:
                 continue
+            if not prov[0]: # if the provname is '' then just skip it (opal-3.4.2-1.fc10 :()
+                continue
             # FIXME: This is probably the best place to fix the postfix rename
             # problem long term (post .21) ... see compare_providers.
             for pkg, hits in self.tsInfo.getRequires(*prov).iteritems():
diff --git a/yum/misc.py b/yum/misc.py
index ebce8e1..ba1399c 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -641,6 +641,8 @@ def string_to_prco_tuple(prcoString):
         n = prcoString
         f = v = None
         
+        if n == '':
+            raise Errors.MiscError, 'PrcoString "%s" is empty.'% prcoString
         if n[0] != '/':
             # not a file dep - look at it for being versioned
             prco_split = n.split()
-- 
1.7.0.1



More information about the Yum-devel mailing list