From: Joerg Jaspert Date: Fri, 13 Mar 2009 16:30:57 +0000 (+0100) Subject: Merge commit 'stew/content_generation' into merge X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=2c80f2edacedc71c64af7d6bbf97a9efc878c617;hp=8ee81b67fbd35c771d8a3c18e53eb9f6e919ac47;p=dak.git Merge commit 'stew/content_generation' into merge * commit 'stew/content_generation': fix database.py to use Binary.scan_package() when contents are missing Signed-off-by: Joerg Jaspert --- 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)