]> git.decadent.org.uk Git - dak.git/commitdiff
fix database.py to use Binary.scan_package() when contents are missing
authorMike O'Connor <stew@vireo.org>
Fri, 13 Mar 2009 16:30:10 +0000 (12:30 -0400)
committerMike O'Connor <stew@vireo.org>
Fri, 13 Mar 2009 16:30:10 +0000 (12:30 -0400)
Signed-off-by: Mike O'Connor <stew@vireo.org>
dak/process_accepted.py
daklib/database.py

index d2b01c6441cbb22440b6836db285378160f3a675..c30e9c4999dfb681b6068c62c4b6570058914bad 100755 (executable)
@@ -390,7 +390,7 @@ def install ():
                 suite_id = database.get_suite_id(suite)
                 projectB.query("INSERT INTO bin_associations (suite, bin) VALUES (%d, currval('binaries_id_seq'))" % (suite_id))
 
-            if not database.copy_temporary_contents(package, version, files[newfile]):
+            if not database.copy_temporary_contents(package, version, files[newfile], reject):
                 reject("Missing contents for package")
 
     orig_tar_id = Upload.pkg.orig_tar_id
index 190ab8dbc2616acbac6073234c1ab7e5a5869671..d58dc72ddbb5817c28506c5704cea79f2873f171 100755 (executable)
@@ -33,7 +33,7 @@ import sys
 import time
 import types
 import utils
-from dbconn import DBConn
+from binary import Binary
 
 ################################################################################
 
@@ -811,7 +811,7 @@ def get_suites(pkgname, src=False):
 
 ################################################################################
 
-def copy_temporary_contents(package, version, deb):
+def copy_temporary_contents(package, version, deb, reject):
     """
     copy the previously stored contents from the temp table to the permanant one
 
@@ -837,7 +837,7 @@ def copy_temporary_contents(package, version, deb):
         message = utils.TemplateSubst(subst, Cnf["Dir::Templates"]+"/missing-contents")
         utils.send_mail( message )
 
-        exists = DBConn().insert_content_path(package, version, deb)
+        Binary(deb, reject).scan_package()
 
     if exists:
         sql = """INSERT INTO content_associations(binary_pkg,filepath,filename)