diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-07-30 15:52:22 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-07-30 15:52:22 +0200 |
commit | 5f8c7c8bd0b7c9f9e2c70adf966369910733ba2e (patch) | |
tree | af4eb84c5cb8b0b77a02165adb8a1def88279f83 | |
parent | 11c6897331d4df7704217d6718c0ad57dc567529 (diff) | |
download | debian-dedup-5f8c7c8bd0b7c9f9e2c70adf966369910733ba2e.tar.gz |
fix update_sharing to work after functionid merge
-rwxr-xr-x | update_sharing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/update_sharing.py b/update_sharing.py index 4669759..910662e 100755 --- a/update_sharing.py +++ b/update_sharing.py @@ -55,8 +55,8 @@ def main(): cur.executemany("INSERT OR IGNORE INTO duplicate (cid) VALUES (?);", [(row[1],) for row in rows]) process_pkgdict(cur, pkgdict) - cur.execute("INSERT INTO issue (cid, issue) SELECT content.id, 'file named something.gz is not a valid gzip file' FROM content WHERE content.filename LIKE '%.gz' AND NOT EXISTS (SELECT 1 FROM hash WHERE hash.cid = content.id AND hash.function = 'gzip_sha512');") - cur.execute("INSERT INTO issue (cid, issue) SELECT content.id, 'png image not named something.png' FROM content JOIN hash ON content.id = hash.cid WHERE function = 'image_sha512' AND lower(filename) NOT LIKE '%.png';") + cur.execute("INSERT INTO issue (cid, issue) SELECT content.id, 'file named something.gz is not a valid gzip file' FROM content WHERE content.filename LIKE '%.gz' AND NOT EXISTS (SELECT 1 FROM hash JOIN function ON hash.fid = function.id WHERE hash.cid = content.id AND function.name = 'gzip_sha512');") + cur.execute("INSERT INTO issue (cid, issue) SELECT content.id, 'png image not named something.png' FROM content JOIN hash ON content.id = hash.cid JOIN function ON hash.fid = function.id WHERE function.name = 'image_sha512' AND lower(filename) NOT LIKE '%.png';") db.commit() if __name__ == "__main__": |