X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=melanie;h=5a5a20582b445e6f9ddb72aab5adcd56a4a805ea;hb=ec1a67974741109d20ca943f324c02bc34a5f21e;hp=9546c35ded0021188da50b988b2a192cd4f26d5c;hpb=aba56aad0ca957e7bfca30abc9ed34943dd6ddaf;p=dak.git diff --git a/melanie b/melanie index 9546c35d..5a5a2058 100755 --- a/melanie +++ b/melanie @@ -2,7 +2,7 @@ # General purpose archive tool for ftpmaster # Copyright (C) 2000, 2001 James Troup -# $Id: melanie,v 1.13 2001-04-13 20:13:30 troup Exp $ +# $Id: melanie,v 1.15 2001-08-11 22:04:27 rmurray 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 @@ -37,6 +37,24 @@ projectB = None; ################################################################################ +def usage (exit_code): + print """Usage: melanie [OPTIONS] package[...] + -D, --debug=VALUE turn on debugging + -h, --help show this help and exit + -a, --architecture=ARCH only act on this architecture + -b, --binary remove binaries only + -c, --component=COMPONENT act on this component + -C, --carbon-copy=EMAIL send a CC of removal message to EMAIL + -d, --done=BUG# send removal message as closure to bug# + -m, --reason=MSG reason for removal + -n, --no-action don't do anything + -p, --partial don't affect override files + -s, --suite=SUITE act on this suite + -S, --source-only remove source only""" + sys.exit(exit_code) + +################################################################################ + # "That's just fucking great! Game over, man! What the fuck are we # going to do now?" @@ -74,6 +92,10 @@ def main (): arguments = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); Options = Cnf.SubTree("Melanie::Options") + + if Options["Help"]: + usage(0) + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); @@ -232,8 +254,6 @@ def main (): source = re_strip_source_version.sub('', source); if source_packages.has_key(source): to_remove.append(i[2:]); - #else: - #sys.stderr.write("W: skipping '%s' as it's source ('%s') isn't one of the source packages.\n" % (filename, source)); print "done." # If we don't have a reason; spawn an editor so the user can add one @@ -359,7 +379,7 @@ def main (): else: bcc = "Bcc: " + bcc; Subst["__BCC__"] = bcc[:-2]; - Subst["__CC__"] = "X-Melanie: $Revision: 1.13 $\n" + carbon_copy[:-1]; + Subst["__CC__"] = "X-Melanie: $Revision: 1.15 $\n" + carbon_copy[:-1]; Subst["__SUITE_LIST__"] = suites_list; Subst["__SUMMARY__"] = summary; Subst["__ADMIN_ADDRESS__"] = Cnf["Dinstall::MyAdminAddress"];