From: Mike O'Connor Date: Thu, 29 Oct 2009 22:00:59 +0000 (+0000) Subject: update20 is closer to tested X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=commitdiff_plain;h=1701f98e315f37de1bec452c469df500a211bfa6 update20 is closer to tested Signed-off-by: Mike O'Connor --- diff --git a/dak/dakdb/update20.py b/dak/dakdb/update20.py index fcb78209..6a44dd31 100755 --- a/dak/dakdb/update20.py +++ b/dak/dakdb/update20.py @@ -65,14 +65,14 @@ def check_signature (sig_filename, data_filename=""): # If we failed to parse the status-fd output, let's just whine and bail now if internal_error: warn("Couldn't parse signature") - return (None, rejects) + return None # usually one would check for bad things here. We, however, do not care. # Next check gpgv exited with a zero return code if exit_status: warn("Couldn't parse signature") - return (None, rejects) + return None # Sanity check the good stuff we expect if not keywords.has_key("VALIDSIG"): @@ -84,7 +84,7 @@ def check_signature (sig_filename, data_filename=""): else: fingerprint = args[0] - return (fingerprint, []) + return fingerprint ################################################################################ @@ -139,7 +139,8 @@ def do_update(self): changes = Changes() changesfile = os.path.join(dirpath, changesfile) changes.changes = parse_changes(changesfile, signing_rules=-1) - (changes.changes["fingerprint"], _) = check_signature(changesfile)) + changes.changes["fingerprint"], = check_signature(changesfile) + changes.add_known_changes(directory) except InvalidDscError, line: warn("syntax error in .dsc file '%s', line %s." % (f, line)) failure += 1 @@ -147,7 +148,6 @@ def do_update(self): warn("found invalid changes file, not properly utf-8 encoded") failure += 1 - changes.add_known_changes(directory) c.execute("GRANT ALL ON known_changes TO ftpmaster;") c.execute("GRANT SELECT ON known_changes TO public;") diff --git a/daklib/changes.py b/daklib/changes.py index 0fc21cb3..12cee457 100755 --- a/daklib/changes.py +++ b/daklib/changes.py @@ -29,6 +29,9 @@ Changes class for dak import os import stat +import time + +import datetime from cPickle import Unpickler, Pickler from errno import EPERM @@ -36,6 +39,8 @@ from apt_inst import debExtractControl from apt_pkg import ParseSection from utils import open_file, fubar, poolify +from config import * +from dbconn import * ############################################################################### @@ -199,7 +204,7 @@ class Changes(object): (changesname, seen, source, binaries, architecture, version, distribution, urgency, maintainer, fingerprint, changedby, date) VALUES (:changesfile,:filetime,:source,:binary, :architecture, - :version,:distribution,:urgency,'maintainer,:changedby,:date)""", + :version,:distribution,:urgency,:maintainer,:fingerprint,:changedby,:date)""", { 'changesfile':changesfile, 'filetime':filetime, 'source':self.changes["source"],