[linux] 02/07: debian/lib/python: Never merge package relations with a different version operator
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Tue Nov 10 13:53:14 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository linux.
commit f87229e26d95445c9e1ef57e140b3662381363af
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Tue Nov 10 12:40:25 2015 +0000
debian/lib/python: Never merge package relations with a different version operator
This doesn't currently make any difference, but it's obviously wrong
to ignore the operator.
---
debian/lib/python/debian_linux/debian.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py
index e59e64f..e58b782 100644
--- a/debian/lib/python/debian_linux/debian.py
+++ b/debian/lib/python/debian_linux/debian.py
@@ -283,7 +283,8 @@ class PackageRelationGroup(list):
def _search_value(self, value):
for i, j in zip(self, value):
- if i.name != j.name or i.version != j.version:
+ if i.name != j.name or i.operator != j.operator or \
+ i.version != j.version:
return None
return self
@@ -352,6 +353,9 @@ class PackageRelationEntry(object):
def __str__(self):
return self.operators_text[self._op]
+ def __eq__(self, other):
+ return type(other) == type(self) and self._op == other._op
+
def __init__(self, value=None, override_arches=None):
if not isinstance(value, str):
raise ValueError
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list