[dak/master] fix database.py to use Binary.scan_package() when contents are missing
Signed-off-by: Mike O'Connor <stew@vireo.org>
---
dak/process_accepted.py | 2 +-
daklib/database.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dak/process_accepted.py b/dak/process_accepted.py
index d2b01c6..c30e9c4 100755
--- a/dak/process_accepted.py
+++ b/dak/process_accepted.py
@@ -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
diff --git a/daklib/database.py b/daklib/database.py
index 190ab8d..d58dc72 100755
--- a/daklib/database.py
+++ b/daklib/database.py
@@ -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)
--
1.5.6.5
Reply to: