[yum-cvs] yum/yum packages.py,1.74,1.75

Paul Nasrat pnasrat at linux.duke.edu
Fri Oct 13 13:02:38 UTC 2006


Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv20109

Modified Files:
	packages.py 
Log Message:
Update comparison patch from Tim Lauridsen

Index: packages.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/packages.py,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- packages.py	13 Oct 2006 01:24:38 -0000	1.74
+++ packages.py	13 Oct 2006 13:02:36 -0000	1.75
@@ -189,16 +189,8 @@
         self._changelog = [] # (ctime, cname, ctext)
         self.licenses = []
 
-    def __eq__(self, other):
-        if comparePoEVR(self, other) == 0 and self.arch == other.arch:
-            return True
-        return False
-
-    def __ne__(self, other):
-        if comparePoEVR(self, other) != 0 and self.arch != other.arch:
-            return True
-        return False
-       
+    def returnEVR(self):
+        return packageEVR(self.epoch,self.ver,self.rel)
     
     def __hash__(self):
         mystr = '%s - %s:%s-%s-%s.%s' % (self.repo.id, self.epoch, self.name,
@@ -327,7 +319,7 @@
     conflicts_print = property(fget=lambda self: self.returnPrco('conflicts', True))
     obsoletes_print = property(fget=lambda self: self.returnPrco('obsoletes', True))
     changelog = property(fget=lambda self: self.returnChangelog())
-    EVR = property(fget=lambda self: self.returnEVR())
+    EVR = property(fget=self.returnEVR())
     
 class PackageEVR:
     




More information about the Yum-cvs-commits mailing list