- Upload.pkg.changes_file = changes_file
- Upload.init_vars()
- Upload.update_vars()
- files = Upload.pkg.files
- changes = Upload.pkg.changes
-
- changes["suite"] = copy.copy(changes["distribution"])
- distribution = changes["distribution"].keys()[0]
- # Find out what's new
- new = queue.determine_new(changes, files, projectB, 0)
-
- stdout_fd = sys.stdout
+ session = DBConn().session()
+ u = Upload()
+ u.pkg.changes_file = changes_file
+ (u.pkg.changes["fingerprint"], rejects) = utils.check_signature(changes_file)
+ u.load_changes(changes_file)
+ new_queue = get_policy_queue('new', session );
+ u.pkg.directory = new_queue.path
+ u.update_subst()
+ origchanges = os.path.abspath(u.pkg.changes_file)
+ files = u.pkg.files
+ changes = u.pkg.changes
+
+ for deb_filename, f in files.items():
+ if deb_filename.endswith(".udeb") or deb_filename.endswith(".deb"):
+ u.binary_file_checks(deb_filename, session)
+ u.check_binary_against_db(deb_filename, session)
+ else:
+ u.source_file_checks(deb_filename, session)
+ u.check_source_against_db(deb_filename, session)
+ u.pkg.changes["suite"] = u.pkg.changes["distribution"]
+
+ new = determine_new(u.pkg.changes, files, 0, session)