From 3e18c48e7a3895ed86020b6392be21334180683b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 23 Nov 2008 04:23:54 +0000 Subject: Add docs for all of the supported commands. svn path=/main/trunk/; revision=12047 --- bin/emaint | 30 ++++++++++++++++++++++++++---- man/emaint.1 | 28 +++++++++++++++++++++++++--- 2 files changed, 51 insertions(+), 7 deletions(-) diff --git a/bin/emaint b/bin/emaint index 561d26719..14e9e49d4 100755 --- a/bin/emaint +++ b/bin/emaint @@ -4,6 +4,7 @@ import os import re import signal import sys +import textwrap import time from optparse import OptionParser, OptionValueError @@ -18,6 +19,8 @@ import portage.const, portage.exception, portage.output class WorldHandler(object): + short_desc = "Fix problems in the world file" + def name(): return "world" name = staticmethod(name) @@ -103,6 +106,8 @@ class WorldHandler(object): class BinhostHandler(object): + short_desc = "Generate a metadata index for binary packages" + def name(): return "binhost" name = staticmethod(name) @@ -315,6 +320,9 @@ class MoveHandler(object): return errors class MoveInstalled(MoveHandler): + + short_desc = "Perform package move updates for installed packages" + def name(): return "moveinst" name = staticmethod(name) @@ -323,6 +331,9 @@ class MoveInstalled(MoveHandler): MoveHandler.__init__(self, portage.db[myroot]["vartree"]) class MoveBinary(MoveHandler): + + short_desc = "Perform package move updates for binary packages" + def name(): return "movebin" name = staticmethod(name) @@ -407,6 +418,9 @@ class ProgressHandler(object): raise NotImplementedError(self) class CleanResume(object): + + short_desc = "Discard emerge --resume merge lists" + def name(): return "cleanresume" name = staticmethod(name) @@ -483,12 +497,20 @@ def emaint_main(myargv): setattr(parser, var, str(option)) - usage = "usage: emaint [options] " + " | ".join(module_names) + usage = "usage: emaint [options] COMMAND" - usage+= "\n\nCurrently emaint can only check and fix problems with one's world\n" - usage+= "file. Future versions will integrate other portage check-and-fix\n" - usage+= "tools and provide a single interface to system health checks." + desc = "The emaint program provides an interface to system health " + \ + "checks and maintenance. See the emaint(1) man page for " + \ + "for additional information about the following commands:" + usage += "\n\n" + for line in textwrap.wrap(desc, 65): + usage += "%s\n" % line + usage += "\n" + usage += " %s" % "all".ljust(15) + \ + "Perform all supported commands\n" + for m in module_names[1:]: + usage += " %s%s\n" % (m.ljust(15), modules[m].short_desc) parser = OptionParser(usage=usage, version=portage.VERSION) parser.add_option("-c", "--check", help="check for problems", diff --git a/man/emaint.1 b/man/emaint.1 index 31624b208..63854c02e 100644 --- a/man/emaint.1 +++ b/man/emaint.1 @@ -4,10 +4,32 @@ emaint \- performs system health checks and maintenance .SH SYNOPSIS .BR emaint [\fIoptions\fR] -[\fBall\fR | \fBworld\fR] +[\fBall\fR | \fBbinhost\fR | \fBcleanresume\fR | \ +\fBmovebin\fR | \fBmoveinst\fR | \fBworld\fR] .SH DESCRIPTION -.B emaint -checks for and fixes problems in the portage \fIworld\fR file. +The emaint program provides an interface to system health +checks and maintenance. +.SH COMMANDS +.TP +.BR all +Perform all supported commands. +.TP +.BR binhost +Generate a metadata index for binary packages located in \fBPKGDIR\fR (for +download by remote clients). See the \fBPORTAGE_BINHOST\fR documentation in +the \fBmake.conf\fR(5) man page for additional information. +.TP +.BR cleanresume +Discard merge lists saved for the \fBemerge\fR(1) \fB--resume\fR action. +.TP +.BR movebin +Perform package move updates for binary packages located in \fBPKGDIR\fR. +.TP +.BR moveinst +Perform package move updates for installed packages. +.TP +.BR world +Fix problems in the \fIworld\fR file. .SH OPTIONS .TP .B \-c, \-\-check -- cgit v1.2.3-1-g7c22