X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=madison;h=7496dd6873396121d43fa5f5e52167c3458571e4;hb=a092f0aa8e82394e25a16da9e87263ee26b8de0e;hp=1ad72e05d5e577733dcaf13bfe2bdfca61efa8a9;hpb=98cd3d01bddf470863532e56c4aa9b58a49e820f;p=dak.git diff --git a/madison b/madison index 1ad72e05..7496dd68 100755 --- a/madison +++ b/madison @@ -2,7 +2,7 @@ # Display information about package(s) (suite, version, etc.) # Copyright (C) 2000, 2001 James Troup -# $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 @@ -48,12 +48,13 @@ def arch_compare (a, b): ################################################################################ -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\"""" @@ -70,17 +71,16 @@ def main (): 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.");