X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_accepted.py;h=7b78f08c73f26b2327181b258738e18beba8ad4a;hb=7e1fd15629858d8b3437cb7626f853e74c461ec1;hp=51c6a5d77db7b2748d8836a46dc7007421fe8b43;hpb=28f3e6f0659504214d482d682f4b2b4791872cc6;p=dak.git diff --git a/dak/process_accepted.py b/dak/process_accepted.py index 51c6a5d7..7b78f08c 100755 --- a/dak/process_accepted.py +++ b/dak/process_accepted.py @@ -40,14 +40,12 @@ import fcntl import os import sys from datetime import datetime -import re -import apt_pkg, commands +import apt_pkg from daklib import daklog from daklib.queue import * from daklib import utils from daklib.dbconn import * -from daklib.binary import copy_temporary_contents from daklib.dak_exceptions import * from daklib.regexes import re_default_answer, re_issource, re_fdnic from daklib.urgencylog import UrgencyLog @@ -313,17 +311,24 @@ def add_deb_to_db(u, filename, session): for suite_name in u.pkg.changes["distribution"].keys(): ba = BinAssociation() ba.binary_id = bin.binary_id - ba.suite_id = get_suite(suite_name).suite_id + suite = get_suite(suite_name) + ba.suite_id = suite.suite_id + + component_id = bin.poolfile.location.component_id; + component_id = bin.poolfile.location.component_id; + + contents = copy_temporary_contents(bin os.path.basename(filename), None, session) + if not contents: + print "REJECT\nCould not determine contents of package %s" % bin.package + session.rollback() + raise MissingContents, "No contents stored for package %s, and couldn't determine contents of %s" % (bin.package, filename) + + session.add(ba) + session.flush() - # Deal with contents - disabled for now - #contents = copy_temporary_contents(bin.package, bin.version, bin.architecture.arch_string, os.path.basename(filename), None, session) - #if not contents: - # print "REJECT\nCould not determine contents of package %s" % bin.package - # session.rollback() - # raise MissingContents, "No contents stored for package %s, and couldn't determine contents of %s" % (bin.package, filename) def install(u, session, log_urgency=True): @@ -584,7 +589,7 @@ def stable_install(u, session, summary, short_summary, fromsuite_name="proposed- if not Options["No-Mail"] and u.pkg.changes["architecture"].has_key("source"): u.Subst["__SUITE__"] = " into %s" % (tosuite) u.Subst["__SUMMARY__"] = summary - u.Subst["__BCC__"] = "X-DAK: dak process-accepted\nX-Katie: $Revision: 1.18 $" + u.Subst["__BCC__"] = "X-DAK: dak process-accepted" if cnf.has_key("Dinstall::Bcc"): u.Subst["__BCC__"] += "\nBcc: %s" % (cnf["Dinstall::Bcc"])