summaryrefslogtreecommitdiffstats
path: root/bin/emaint
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-23 04:23:54 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-23 04:23:54 +0000
commit3e18c48e7a3895ed86020b6392be21334180683b (patch)
tree5c7c2fb431bd1bc8519118c6e8bffbb4133ed5df /bin/emaint
parent4936d1855919422edd84ce7f90c6c763c6871ec2 (diff)
downloadportage-3e18c48e7a3895ed86020b6392be21334180683b.tar.gz
portage-3e18c48e7a3895ed86020b6392be21334180683b.tar.bz2
portage-3e18c48e7a3895ed86020b6392be21334180683b.zip
Add docs for all of the supported commands.
svn path=/main/trunk/; revision=12047
Diffstat (limited to 'bin/emaint')
-rwxr-xr-xbin/emaint30
1 files changed, 26 insertions, 4 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",