On Mon, Nov 29, 2010 at 07:26:49PM +0100, Michael Schroeder wrote:
> On Mon, Nov 29, 2010 at 01:10:25PM -0500, James Antill wrote:
> > ...before rpm even sees it. Does that still change?
> 
> Uh, you're confusing me. "Provides: foo > 1.2, Requires foo = 1.2"
> does not match, both with and without the patch. But the patch
> makes "foo > 1.2-1" match "foo = 1.2". So you probably need to
> remove the yum workaround and rely on rpm doing the right thing.

I think you're talking about rangeCompare() in miscutils.py.
The patch would look something like (untested):

--- ./miscutils.py.orig 2010-11-29 18:39:33.000000000 +0000
+++ ./miscutils.py      2010-11-29 18:49:34.000000000 +0000
@@ -145,6 +145,8 @@ def rangeCompare(reqtuple, provtuple):
     if f is None or reqf is None:
         return 1
 
+    oldr = r
+    oldreqr = reqr
     # and you thought we were done having fun
     # if the requested release is left out then we have
     # to remove release from the package prco to make sure the match
@@ -171,6 +173,12 @@ def rangeCompare(reqtuple, provtuple):
             if f in ['LE', 10]:
                 return 1
     if rc == 0:
+        if r is None:
+            # always match if the side with no release contains '='
+            if oldr is not None and reqf in ['GE', 'EQ', 'LE', 12, 8, 10]:
+                return 1
+            if oldreqr is not None and f in ['GE', 'EQ', 'LE', 12, 8, 10]:
+                return 1
         if reqf in ['GT', 4]:
             if f in ['GT', 'GE', 4, 12]:
                 return 1

Cheers,
  Michael.

-- 
Michael Schroeder                                   m...@suse.de
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to