From: Anthony Towns Date: Wed, 5 Dec 2007 07:26:02 +0000 (+0000) Subject: process_unchecked: better support for autobyhand handling (gives script X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b9ada122cf00986a2f44d97bfc57b34e4e9ea98;p=dak process_unchecked: better support for autobyhand handling (gives script full .changes file, will leave as BYHAND if script fails) --- diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index c4ebd994..412ad64a 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -421,7 +421,7 @@ def check_files(): files[file]["type"] = "unreadable" continue # If it's byhand skip remaining checks - if files[file]["section"] == "byhand" or files[file]["section"] == "raw-installer": + if files[file]["section"] == "byhand" or files[file]["section"][4:] == "raw-": files[file]["byhand"] = 1 files[file]["type"] = "byhand" # Checks for a binary package... @@ -1339,23 +1339,32 @@ def is_autobyhand (): return any_auto and all_auto def do_autobyhand (summary, short_summary): - print "Accepting AUTOBYHAND." + print "Attempting AUTOBYHAND." + byhandleft = 0 for file in files.keys(): - byhandfile = file + byhandfile = file + if not files[file].has_key("byhand"): + continue if not files[file].has_key("byhand-script"): - # problem! - pass - else: - os.system("ls -l %s" % byhandfile) - result = os.system("%s %s %s %s" % ( - files[file]["byhand-script"], byhandfile, - changes["version"], files[file]["byhand-arch"])) - if result != 0: - print "error?" - os.unlink(byhandfile) - del files[file] - - accept(summary, short_summary) + byhandleft = 1 + continue + + os.system("ls -l %s" % byhandfile) + result = os.system("%s %s %s %s %s" % ( + files[file]["byhand-script"], byhandfile, + changes["version"], files[file]["byhand-arch"], + os.path.abspath(pkg.changes_file))) + if result == 0: + os.unlink(byhandfile) + del files[file] + else: + print "Error processing %s, left as byhand." % (file) + byhandleft = 1 + + if byhandleft: + do_byhand(summary, short_summary) + else: + accept(summary, short_summary) ################################################################################