[dak/master 4/8] update20 is closer to tested
Signed-off-by: Mike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
---
dak/dakdb/update20.py | 10 +++++-----
daklib/changes.py | 7 ++++++-
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/dak/dakdb/update20.py b/dak/dakdb/update20.py
index fcb7820..6a44dd3 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 0fc21cb..12cee45 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"],
--
1.6.3.3
Reply to: