import re
import signal
import sys
+import textwrap
import time
from optparse import OptionParser, OptionValueError
class WorldHandler(object):
+ short_desc = "Fix problems in the world file"
+
def name():
return "world"
name = staticmethod(name)
class BinhostHandler(object):
+ short_desc = "Generate a metadata index for binary packages"
+
def name():
return "binhost"
name = staticmethod(name)
return errors
class MoveInstalled(MoveHandler):
+
+ short_desc = "Perform package move updates for installed packages"
+
def name():
return "moveinst"
name = staticmethod(name)
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)
raise NotImplementedError(self)
class CleanResume(object):
+
+ short_desc = "Discard emerge --resume merge lists"
+
def name():
return "cleanresume"
name = staticmethod(name)
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",
.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