]> err.no Git - dak/commitdiff
update20 is closer to tested
authorMike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
Thu, 29 Oct 2009 22:00:59 +0000 (22:00 +0000)
committerMike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
Thu, 29 Oct 2009 22:00:59 +0000 (22:00 +0000)
Signed-off-by: Mike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
dak/dakdb/update20.py
daklib/changes.py

index fcb7820945571b1490c9c8d30804ca88d74942ce..6a44dd316bc9948a35a3e38f18401abd5f876885 100755 (executable)
@@ -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;")
index 0fc21cb39d59b5f1326d0fdedc2be8570b4979c6..12cee457c5f7976d16ac999eb3d57d629dd339b0 100755 (executable)
@@ -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"],