# Checks Debian packages from Incoming
# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
-# $Id: jennifer,v 1.28 2002-10-21 13:54:53 troup Exp $
+# $Id: jennifer,v 1.30 2003-01-02 18:11:53 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
################################################################################
# Globals
-jennifer_version = "$Revision: 1.28 $";
+jennifer_version = "$Revision: 1.30 $";
Cnf = None;
Options = None;
changes_files = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
Options = Cnf.SubTree("Dinstall::Options")
+ if Options["Help"]:
+ usage();
+ elif Options["Version"]:
+ print "jennifer %s" % (jennifer_version);
+ sys.exit(0);
+
Katie = katie.Katie(Cnf);
changes = Katie.pkg.changes;
return changes_files;
-#########################################################################################
+################################################################################
def usage (exit_code=0):
print """Usage: dinstall [OPTION]... [CHANGES]...
-V, --version display the version number and exit"""
sys.exit(exit_code)
-#########################################################################################
+################################################################################
# Our very own version of commands.getouputstatus(), hacked to support
# gpgv's status fd.
return output, status, exit_status;
-#########################################################################################
+################################################################################
def Dict(**dict): return dict
if str:
reject_message += prefix + str + "\n";
-#########################################################################################
+################################################################################
def check_signature (filename):
if not utils.re_taint_free.match(os.path.basename(filename)):
if not changes["architecture"].has_key(architecture):
reject("%s: control file lists arch as `%s', which isn't in changes file." % (file, architecture));
+ # Sanity-check the Depends field
+ depends = control.Find("Depends");
+ if depends == '':
+ reject("%s: Depends field is empty." % (file));
+
# Check the section & priority match those given in the .changes (non-fatal)
if control.Find("Section") != None and files[file]["section"] != "" and files[file]["section"] != control.Find("Section"):
reject("%s control file lists section as `%s', but changes file has `%s'." % (file, control.Find("Section", ""), files[file]["section"]), "Warning: ");
changes_files = init();
- if Options["Help"]:
- usage();
-
- if Options["Version"]:
- print "jennifer %s" % (jennifer_version);
- sys.exit(0);
-
# -n/--dry-run invalidates some other options which would involve things happening
if Options["No-Action"]:
Options["Automatic"] = "";