提交 eb12fb9b 编写于 作者: J Joerg Jaspert

Error out when we are unable to find a source id for a file we want to install. Shouldnt happen.

上级 b5e472e7
2008-08-07 Joerg Jaspert <joerg@debian.org>
* dak/process_accepted.py (install): Error out with the new
exception if we dont know the source package for a file we want to
install. Shouldn't ever hit us, but better safe than sorry.
* daklib/dak_exceptions.py (dakerrors): new exception - no source field.
2008-08-05 Joerg Jaspert <joerg@debian.org>
* config/debian/cron.unchecked: disable the ssh-move insanity (and
......
......@@ -35,6 +35,7 @@ from daklib import database
from daklib import logging
from daklib import queue
from daklib import utils
from daklib.dak_exceptions import *
###############################################################################
......@@ -354,8 +355,7 @@ def install ():
projectB.query("INSERT INTO binaries (package, version, maintainer, source, architecture, file, type, sig_fpr) VALUES ('%s', '%s', %d, %d, %d, %d, '%s', %d)"
% (package, version, maintainer_id, source_id, architecture_id, files[file]["files id"], type, fingerprint_id))
else:
projectB.query("INSERT INTO binaries (package, version, maintainer, architecture, file, type, sig_fpr) VALUES ('%s', '%s', %d, %d, %d, '%s', %d)"
% (package, version, maintainer_id, architecture_id, files[file]["files id"], type, fingerprint_id))
raise NoSourceFieldError, "Unable to find a source id for %s (%s), %s, file %s, type %s, signed by %s" % (package, version, architecture, file, type, sig_fpr)
for suite in changes["distribution"].keys():
suite_id = database.get_suite_id(suite)
projectB.query("INSERT INTO bin_associations (suite, bin) VALUES (%d, currval('binaries_id_seq'))" % (suite_id))
......
......@@ -48,7 +48,8 @@ dakerrors = {
"FileExistsError": """Exception raised when destination file exists.""",
"SendmailFailedError": """Exception raised when Sendmail invocation failed.""",
"NoFreeFilenameError": """Exception raised when no alternate filename was found.""",
"TransitionsError": """Exception raised when transitions file can't be parsed."""
"TransitionsError": """Exception raised when transitions file can't be parsed.""",
"NoSourceFieldError": """Exception raised - we cant find the source - wtf?"""
}
def construct_dak_exception(name, description):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册