X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=dak%2Fimport_new_files.py;h=7a29467a18be52a488ee2f2b00f272a83e2c0364;hb=a18e312ddb923f4b6c5134201d72cc626b8e6392;hp=ecc03044eb497b7a025377e106b4cc86fbf9b8a9;hpb=5c0a8a7d206488703cc672b166dd615d5958f043;p=dak.git diff --git a/dak/import_new_files.py b/dak/import_new_files.py index ecc03044..7a29467a 100755 --- a/dak/import_new_files.py +++ b/dak/import_new_files.py @@ -34,7 +34,7 @@ import logging import threading import glob import apt_pkg -from daklib.dbconn import DBConn, get_dbchange, get_policy_queue, session_wrapper, ChangePendingFile +from daklib.dbconn import DBConn, get_dbchange, get_policy_queue, session_wrapper, ChangePendingFile, get_location, check_poolfile from daklib.config import Config from daklib.queue import Upload from daklib.utils import poolify @@ -122,7 +122,7 @@ class ImportNewFiles(object): found, poolfile = check_poolfile(os.path.join(poolname, chg_fn), u.pkg.files[chg_fn]['size'], u.pkg.files[chg_fn]["md5sum"], - l, + l.location_id, session=session) if found is None: @@ -136,14 +136,14 @@ class ImportNewFiles(object): log.critical("ERROR: Could not find %s in pool" % chg_fn) sys.exit(1) else: - chg.changeslinks.append(poolfile) + chg.poolfiles.append(poolfile) chg.files = files session.commit() - + except KeyboardInterrupt: print("Caught C-c; terminating.") utils.warn("Caught C-c; terminating.") @@ -158,7 +158,7 @@ def main(): ('v',"verbose", "%s::%s" % (options_prefix,"Verbose")), ] - args = apt_pkg.ParseCommandLine(cnf.Cnf, arguments,sys.argv) + args = apt_pkg.parse_commandline(cnf.Cnf, arguments,sys.argv) num_threads = 1