]> git.decadent.org.uk Git - dak.git/blobdiff - dak/import_new_files.py
Pass compression methods to FileWriter.
[dak.git] / dak / import_new_files.py
index ecc03044eb497b7a025377e106b4cc86fbf9b8a9..7a29467a18be52a488ee2f2b00f272a83e2c0364 100755 (executable)
@@ -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