[Yum-devel] RFC: Package object comparison -- do we need a slight change?

tim at rasmil.dk tim at rasmil.dk
Fri Oct 13 12:11:21 UTC 2006


 On Fri Oct 13  2:28 , Jeremy Katz <katzj at redhat.com> wrote:On Thu, 2006-10-12 at 14:32 -0400, seth vidal wrote:
> On Thu, 2006-10-12 at 09:45 +0200, Tim Lauridsen wrote:
> > Tim Lauridsen wrote:
> > > My proposal is to remove the rich comparisons for package objects and 
> > > add an EVR property there return a compareable
> > > packageEVR object, there contain the rich comparisons for evr. (See 
> > > the attached patch)
> > >
> > > if po1 > po2: will have to be changed to
> > >
> > > if po1.EVR > po2.EVR:  # Everybody should be able to see what we are 
> > > comparing here.
>
> yah - that's what we were talking about last night (or morning for you,
> or whatever)
> 
> Right now I think that's the way we have to go and we need to sift
> through all the code  (yum-utils, too) and look for all places a po is
> compared for ver and fix it up.

Committed this (with the needed fix) as well as fixed up the users
within yum itself which I could find with some quick grepping.

Jeremy

I cook up some regexp to locate 

if *po*|*pkg* >|<|= *po*|*pkg* 

lines.

if\s(\w*po\w*|[\w\.]*pkg[\w.]*)\s[<>=]+.([\w.]*po[\w.]*|[\w.]*pkg[\w.]*) 

it detects both po1 > po2 & po1.EVR > po2.EVR lines.

I found some hits in depsolve.py and i have created a patch (can't commit it myself at the moment)

Tim



-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-po-compare-depsolve.patch
Type: application/octet-stream
Size: 1283 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20061013/157e87b5/attachment.obj 


More information about the Yum-devel mailing list