# Display information about package(s) (suite, version, etc.)
# Copyright (C) 2000, 2001 James Troup <james@nocrew.org>
-# $Id: madison,v 1.10 2001-09-13 23:57:17 troup Exp $
+# $Id: madison,v 1.11 2001-09-27 01:23:41 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
################################################################################
-def usage (exit_code):
+def usage (exit_code=0):
print """Usage: madison [OPTION] PACKAGE[...]
Display information about PACKAGE(s).
- -a, --architecture=ARCH only show information for this architecture
- -s, --suite=SUITE only show information for this suite
+ -a, --architecture=ARCH only show information for this architecture
+ -s, --suite=SUITE only show information for this suite
+ -h, --help show this help and exit
Both ARCH and SUITE can be space seperated lists, e.g.
--architecture=\"m68k i386\""""
apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file());
Arguments = [('a',"architecture","Madison::Options::Architecture", "HasArg"),
- ('m',"maintainer","Madison::Options::Architecture"),
('s',"suite","Madison::Options::Suite", "HasArg"),
- ('D',"debug","Madison::Options::Debug", "IntVal"),
- ('h',"help","Madison::Options::Help"),
- ('V',"version","Madison::Options::Version")];
+ ('h',"help","Madison::Options::Help")];
+ for i in ["architecture", "suite", "help" ]:
+ Cnf["Madison::Options::%s" % (i)] = "";
packages = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
Options = Cnf.SubTree("Madison::Options")
if Options["Help"]:
- usage(0);
+ usage();
if packages == []:
utils.fubar("need at least one package name as an argument.");