]> git.decadent.org.uk Git - dak.git/commitdiff
correctly importing file hashes now
authorMike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
Sat, 14 Nov 2009 14:57:47 +0000 (14:57 +0000)
committerMike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
Sat, 14 Nov 2009 14:57:47 +0000 (14:57 +0000)
Signed-off-by: Mike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
dak/import_new_files.py

index ff49e6c3567b96e5c378d632eb1f53c9fe19266b..253e656d4b17f2eb3e02c6aa3d1abf21afb6827b 100755 (executable)
@@ -72,6 +72,7 @@ class ImportNewFiles(object):
                 u = Upload()
                 success = u.load_changes(changes_fn)
                 u.pkg.changes_file = changes_bn
+                u.check_hashes()
 
                 if not chg:
                     chg = u.pkg.add_known_changes(newq.path, newq.policy_queue_id, session)
@@ -89,6 +90,8 @@ class ImportNewFiles(object):
                     cpf.filename = chg_fn
                     cpf.size = u.pkg.files[chg_fn]['size']
                     cpf.md5sum = u.pkg.files[chg_fn]['md5sum']
+                    cpf.sha1sum = u.pkg.files[chg_fn]['sha1sum']
+                    cpf.sha256sum = u.pkg.files[chg_fn]['sha256sum']
 
                     session.add(cpf)
                     files.append(cpf)