diff options
author | Helmut Grohne <helmut@subdivi.de> | 2014-02-23 15:44:03 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2014-02-23 15:44:03 +0100 |
commit | b38f14ab3fb72ca1578d7e6bb09178e6fbebba76 (patch) | |
tree | 352aec2325d46597f944535e10615abf267f0968 /webapp.py | |
parent | 332ac9eafb235443f163c606ced95dcbd615815e (diff) | |
download | debian-dedup-b38f14ab3fb72ca1578d7e6bb09178e6fbebba76.tar.gz |
webapp: fix eqclass usage in package comparison
When comparing two packages, objects would be considered duplicates
without considering whether the respective hash functions are comparable
by checking their equivalence classes. The current set of hash functions
does not expose this bug.
Diffstat (limited to 'webapp.py')
-rwxr-xr-x | webapp.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -182,7 +182,7 @@ class Application(object): entry = dict(filenames=set((filename,)), size=size, matches={}) files[hashvalue] = entry - cur2.execute("SELECT fa.name, ha.hash, fb.name, filename FROM hash AS ha JOIN hash AS hb ON ha.hash = hb.hash JOIN content ON hb.cid = content.id JOIN function AS fa ON ha.fid = fa.id JOIN function AS fb ON hb.fid = fb.id WHERE ha.cid = ? AND pid = ?;", + cur2.execute("SELECT fa.name, ha.hash, fb.name, filename FROM hash AS ha JOIN hash AS hb ON ha.hash = hb.hash JOIN content ON hb.cid = content.id JOIN function AS fa ON ha.fid = fa.id JOIN function AS fb ON hb.fid = fb.id WHERE ha.cid = ? AND pid = ? AND fa.eqclass = fb.eqclass;", (cid, pid2)) for func1, hashvalue, func2, filename in fetchiter(cur2): entry["matches"].setdefault(filename, {})[func1, func2] = \ |