X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=jennifer;h=6c1aa2c577a4c8da30e918cdda654a7bd58f5112;hb=58afa1216ab7e85f70adbb62c0a485304b42ae82;hp=20469d13e3bc1be8133a65095684682a61bc38dc;hpb=eb995fdaa1ecfe19da5b5ebbe3c42d08c000e6ac;p=dak.git diff --git a/jennifer b/jennifer index 20469d13..6c1aa2c5 100755 --- a/jennifer +++ b/jennifer @@ -2,7 +2,7 @@ # Checks Debian packages from Incoming # Copyright (C) 2000, 2001 James Troup -# $Id: jennifer,v 1.2 2002-02-15 02:54:22 troup Exp $ +# $Id: jennifer,v 1.7 2002-02-22 02:19:26 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ re_is_changes = re.compile (r"(.+?)_(.+?)_(.+?)\.changes$"); ################################################################################ # Globals -jennifer_version = "$Revision: 1.2 $"; +jennifer_version = "$Revision: 1.7 $"; Cnf = None; Options = None; @@ -676,7 +676,7 @@ def check_files(): files[file]["new"] = 1; if files[file]["type"] == "deb": - reject(Katie.check_binaries_against_db(file, suite)); + reject(Katie.check_binaries_against_db(file, suite),""); # Validate the component component = files[file]["component"]; @@ -705,6 +705,15 @@ def check_files(): if files[file]["oldfiles"].has_key(suite) and files[file]["oldfiles"][suite]["name"] != files[file]["component"]: files[file]["othercomponents"] = files[file]["oldfiles"][suite]["name"]; + # If the .changes file says it has source, it must have source. + if changes["architecture"].has_key("source"): + has_source = 0; + for file in file_keys: + if files[file]["type"] == "dsc": + has_source = 1; + if not has_source: + reject("no source found and Architecture line in changes mention source."); + ############################################################################### def check_dsc (): @@ -753,10 +762,10 @@ def check_dsc (): reject("version ('%s') in .dsc does not match version ('%s') in .changes." % (epochless_dsc_version, changes_version)); # Ensure source is newer than existing source in target suites - reject(Katie.check_source_against_db(file)); + reject(Katie.check_source_against_db(file),""); (reject_msg, is_in_incoming) = Katie.check_dsc_against_db(file); - reject(reject_msg); + reject(reject_msg, ""); if is_in_incoming: if not Options["No-Action"]: copy_to_holding(is_in_incoming); @@ -933,12 +942,11 @@ def action (): answer = 'A'; while string.find(prompt, answer) == -1: - print prompt,; - answer = utils.our_raw_input() - m = katie.re_default_answer.match(prompt) + answer = utils.our_raw_input(prompt); + m = katie.re_default_answer.match(prompt); if answer == "": - answer = m.group(1) - answer = string.upper(answer[:1]) + answer = m.group(1); + answer = string.upper(answer[:1]); if answer == 'R': os.chdir (pkg.directory); @@ -1026,11 +1034,12 @@ def acknowledge_new (summary): # reprocess is necessary for the case of foo_1.2-1 and foo_1.2-2 in # Incoming. -1 will reference the .orig.tar.gz, but -2 will not. -# dsccheckdistrib() can find the .orig.tar.gz but it will not have -# processed it during it's checks of -2. If -1 has been deleted or -# otherwise not checked by jennifer, the .orig.tar.gz will not have been -# checked at all. To get round this, we force the .orig.tar.gz into -# the .changes structure and reprocess the .changes file. +# Katie.check_dsc_against_db() can find the .orig.tar.gz but it will +# not have processed it during it's checks of -2. If -1 has been +# deleted or otherwise not checked by jennifer, the .orig.tar.gz will +# not have been checked at all. To get round this, we force the +# .orig.tar.gz into the .changes structure and reprocess the .changes +# file. def process_it (changes_file): global reprocess, reject_message;