diff options
-rw-r--r-- | layman/overlays/overlay.py | 7 | ||||
-rw-r--r-- | layman/overlays/source.py | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py index ddb118e..30d0966 100644 --- a/layman/overlays/overlay.py +++ b/layman/overlays/overlay.py @@ -207,8 +207,11 @@ class Overlay(object): 'owner_name', 'priority', 'status'): if getattr(self, i) != getattr(other, i): return False - if set(self.source_uris()) != set(other.source_uris()): - return False + for i in self.sources + other.sources: + if not i in self.sources: + return False + if not i in other.sources: + return False return True def __ne__(self, other): diff --git a/layman/overlays/source.py b/layman/overlays/source.py index e21319f..0dc1ba2 100644 --- a/layman/overlays/source.py +++ b/layman/overlays/source.py @@ -29,6 +29,12 @@ class OverlaySource(object): self.ignore = ignore self.quiet = quiet + def __eq__(self, other): + return self.src == other.src + + def __ne__(self, other): + return not self.__eq__(other) + def add(self, base, quiet = False): '''Add the overlay.''' |