From: Joerg Jaspert Date: Fri, 25 Mar 2011 13:57:39 +0000 (+0100) Subject: Merge remote-tracking branch 'ansgar/package-set' into merge X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0e72a3ee12f53a7a3a0348738389df2e59b35bd9;hp=-c;p=dak.git Merge remote-tracking branch 'ansgar/package-set' into merge * ansgar/package-set: determine_new: Really make `new' an empty dict Signed-off-by: Joerg Jaspert --- 0e72a3ee12f53a7a3a0348738389df2e59b35bd9 diff --combined daklib/queue.py index 84ac6c98,86e768b3..26bacf57 --- a/daklib/queue.py +++ b/daklib/queue.py @@@ -102,7 -102,7 +102,7 @@@ def get_type(f, session) # Determine what parts in a .changes are NEW - def determine_new(filename, changes, files, warn=1, session = None, dsc = None, new = {}): + def determine_new(filename, changes, files, warn=1, session = None, dsc = None, new = None): """ Determine what parts in a C{changes} file are NEW. @@@ -131,6 -131,8 +131,8 @@@ # TODO: This should all use the database instead of parsing the changes # file again byhand = {} + if new is None: + new = {} dbchg = get_dbchange(filename, session) if dbchg is None: @@@ -2072,7 -2074,6 +2074,7 @@@ distribution."" print "Installing." self.logger.log(["installing changes", self.pkg.changes_file]) + binaries = [] poolfiles = [] # Add the .dsc file to the DB first @@@ -2085,9 -2086,7 +2087,9 @@@ # Add .deb / .udeb files to the DB (type is always deb, dbtype is udeb/deb) for newfile, entry in self.pkg.files.items(): if entry["type"] == "deb": - poolfiles.append(add_deb_to_db(self, newfile, session)) + b, pf = add_deb_to_db(self, newfile, session) + binaries.append(b) + poolfiles.append(pf) # If this is a sourceful diff only upload that is moving # cross-component we need to copy the .orig files into the new @@@ -2172,18 -2171,6 +2174,18 @@@ # Our SQL session will automatically start a new transaction after # the last commit + # Now ensure that the metadata has been added + # This has to be done after we copy the files into the pool + # For source if we have it: + if self.pkg.changes["architecture"].has_key("source"): + import_metadata_into_db(source, session) + + # Now for any of our binaries + for b in binaries: + import_metadata_into_db(b, session) + + session.commit() + # Move the .changes into the 'done' directory utils.move(self.pkg.changes_file, os.path.join(cnf["Dir::Queue::Done"], os.path.basename(self.pkg.changes_file)))