X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_unchecked.py;h=07e3c22abc0514f179d8c6cf854639fc4dadd85b;hb=d44faefd78782178bddbaf494c0aa453114f460a;hp=491c5560ec7b7c968b17bbeeb37c4514f778c049;hpb=f96dff8bac6b5d13eceb2bf1bbe59d5998a27cce;p=dak.git diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index 491c5560..07e3c22a 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -37,7 +37,6 @@ import shutil import stat import sys import time -import tempfile import traceback import tarfile import apt_inst @@ -145,16 +144,6 @@ def reject (str, prefix="Rejected: "): ################################################################################ -def create_tmpdir(): - """ - Create a temporary directory that can be used for unpacking files into for - checking - """ - tmpdir = tempfile.mkdtemp() - return tmpdir - -################################################################################ - def copy_to_holding(filename): global in_holding @@ -400,7 +389,7 @@ def check_files(): cursor = DBConn().cursor() # Check for packages that have moved from one component to another # STU: this should probably be changed to not join on architecture, suite tables but instead to used their cached name->id mappings from DBConn - cursor.execute("""PREPARE moved_pkg_q AS + cursor.execute("""PREPARE moved_pkg_q(text,text,text) AS SELECT c.name FROM binaries b, bin_associations ba, suite s, location l, component c, architecture a, files f WHERE b.package = $1 AND s.suite_name = $2 @@ -572,7 +561,7 @@ def check_files(): # Check the version and for file overwrites reject(Upload.check_binary_against_db(f),"") - Binary(f).scan_package() + Binary(f, reject).scan_package( ) # Checks for a source package... else: @@ -889,7 +878,7 @@ def check_source(): or pkg.orig_tar_gz == -1: return - tmpdir = create_tmpdir() + tmpdir = utils.temp_dirname() # Move into the temporary directory cwd = os.getcwd()