X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_unchecked.py;h=fdf052d269440190dbdf7f0281662f4646ac7bba;hb=b612f3da207fa0d75a5d3b204ac8f02bb244231a;hp=0a12eacabde747c504d0c8e11b62f9fe7e1d02fb;hpb=886228a319cf00e80feb24aaf49ecc2db995b243;p=dak.git diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index 0a12eaca..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 @@ -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