X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_unchecked.py;h=fdf052d269440190dbdf7f0281662f4646ac7bba;hb=4ef7b2aa736c4542473f81cdeb5dc6cc88e6b633;hp=9301497b6ee18e6c2a31c1fa86af91b6dbad19d2;hpb=ec44bcc3b4bbeb7a389dda77f39ff54436d1b181;p=dak.git diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index 9301497b..fdf052d2 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -1,7 +1,12 @@ #!/usr/bin/env python -""" Checks Debian packages from Incoming """ -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 James Troup +""" +Checks Debian packages from Incoming +@contact: Debian FTP Master +@copyright: 2000, 2001, 2002, 2003, 2004, 2005, 2006 James Troup +@copyright: 2009 Joerg Jaspert +@license: GNU General Public License version 2 or later +""" # 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 @@ -437,6 +442,15 @@ def check_files(): deb_file.close() # Can't continue, none of the checks on control would work. continue + + # Check for mandantory "Description:" + deb_file.seek ( 0 ) + try: + apt_pkg.ParseSection(apt_inst.debExtractControl(deb_file))["Description"] + '\n' + except: + reject("%s: Missing Description in binary package" % (f)) + continue + deb_file.close() # Check for mandatory fields @@ -1483,7 +1497,7 @@ def acknowledge_new (summary, short_summary): Logger.log(["Moving to new", pkg.changes_file]) Upload.dump_vars(Cnf["Dir::Queue::New"]) - move_to_dir(Cnf["Dir::Queue::New"]) + move_to_dir(Cnf["Dir::Queue::New"], perms=0640, changesperms=0644) if not Options["No-Mail"]: print "Sending new ack." @@ -1576,7 +1590,10 @@ def main(): changes_files.remove(f) if changes_files == []: - utils.fubar("Need at least one .changes file as an argument.") + if Cnf["Dinstall::Options::Directory"] == "": + utils.fubar("Need at least one .changes file as an argument.") + else: + sys.exit(0) # Check that we aren't going to clash with the daily cron job