From 0026f80b8be5212683902550c942d4cd4253535b Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 26 Feb 2011 01:19:45 +0100 Subject: [PATCH] Use uuid for fast package comparison. --- pakfire/packages/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pakfire/packages/base.py b/pakfire/packages/base.py index 6389b6325..4bdec60fc 100644 --- a/pakfire/packages/base.py +++ b/pakfire/packages/base.py @@ -23,6 +23,10 @@ class Package(object): if not self.name == other.name: return cmp(self.name, other.name) + # Compare the uuids: if packages have the same id they are totally equal. + if self.uuid and self.uuid == other.uuid: + return 0 + ret = util.version_compare(self.version_tuple, other.version_tuple) # Compare the build times if we have a rebuilt package. -- 2.39.5