Hi Julian,

thank you for the patch.

However I've noticed there's a little problem with it (breaks the unit
tests) as the new function introduced:

+def _convert_deplist(deplist):
+    """Convert '>' to '>>' and '<' to '<<' in the relation."""
+    result = []
+    for or_dep in deplist:
+        new_ordep = []
+        for dep in or_dep:
+            new_ordep.append((dep[0], dep[1], len(dep[2]) == 1 and
2*dep[2] or dep[2]))
+        result.append(new_ordep)
+    return result


Also converts "=" to "=="

In this package that is later used as an dictionary key in:

def allow_version(versionA, versionB, operator):
    return {
        "<<" : lambda a,b : apt_pkg.version_compare(a,b) < 0,
        "<=" : lambda a,b : apt_pkg.version_compare(a,b) <= 0,
        "=" : lambda a,b : apt_pkg.version_compare(a,b) == 0,
        ">=" : lambda a,b : apt_pkg.version_compare(a,b) >= 0,
        ">>" : lambda a,b : apt_pkg.version_compare(a,b) > 0,
    }[operator](versionA, versionB)


When "=" is specified it is converted to "==" and the key lookup fails.

So I think the best thing to do here is to drop the conversion function
and just fix the
dictionary to use the new keys.

I'm guessing you used some automated script to generate the patches so
thought I should let you know in case there are problems elsewhere.

Cheers,

Martin




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to