From 4764b7c2bdd0e3203dbd7cd3b871138c58c3855c Mon Sep 17 00:00:00 2001 From: Mike O'Connor Date: Fri, 13 Mar 2009 12:30:10 -0400 Subject: [PATCH] fix database.py to use Binary.scan_package() when contents are missing Signed-off-by: Mike O'Connor --- 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 d2b01c64..c30e9c49 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 190ab8db..d58dc72d 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) -- 2.39.2