Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r12047 - in main/trunk: bin man
Date: Sun, 23 Nov 2008 04:23:57
Message-Id: E1L46Vn-0003BO-GC@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-11-23 04:23:54 +0000 (Sun, 23 Nov 2008)
3 New Revision: 12047
4
5 Modified:
6 main/trunk/bin/emaint
7 main/trunk/man/emaint.1
8 Log:
9 Add docs for all of the supported commands.
10
11
12 Modified: main/trunk/bin/emaint
13 ===================================================================
14 --- main/trunk/bin/emaint 2008-11-23 00:33:59 UTC (rev 12046)
15 +++ main/trunk/bin/emaint 2008-11-23 04:23:54 UTC (rev 12047)
16 @@ -4,6 +4,7 @@
17 import re
18 import signal
19 import sys
20 +import textwrap
21 import time
22 from optparse import OptionParser, OptionValueError
23
24 @@ -18,6 +19,8 @@
25
26 class WorldHandler(object):
27
28 + short_desc = "Fix problems in the world file"
29 +
30 def name():
31 return "world"
32 name = staticmethod(name)
33 @@ -103,6 +106,8 @@
34
35 class BinhostHandler(object):
36
37 + short_desc = "Generate a metadata index for binary packages"
38 +
39 def name():
40 return "binhost"
41 name = staticmethod(name)
42 @@ -315,6 +320,9 @@
43 return errors
44
45 class MoveInstalled(MoveHandler):
46 +
47 + short_desc = "Perform package move updates for installed packages"
48 +
49 def name():
50 return "moveinst"
51 name = staticmethod(name)
52 @@ -323,6 +331,9 @@
53 MoveHandler.__init__(self, portage.db[myroot]["vartree"])
54
55 class MoveBinary(MoveHandler):
56 +
57 + short_desc = "Perform package move updates for binary packages"
58 +
59 def name():
60 return "movebin"
61 name = staticmethod(name)
62 @@ -407,6 +418,9 @@
63 raise NotImplementedError(self)
64
65 class CleanResume(object):
66 +
67 + short_desc = "Discard emerge --resume merge lists"
68 +
69 def name():
70 return "cleanresume"
71 name = staticmethod(name)
72 @@ -483,12 +497,20 @@
73 setattr(parser, var, str(option))
74
75
76 - usage = "usage: emaint [options] " + " | ".join(module_names)
77 + usage = "usage: emaint [options] COMMAND"
78
79 - usage+= "\n\nCurrently emaint can only check and fix problems with one's world\n"
80 - usage+= "file. Future versions will integrate other portage check-and-fix\n"
81 - usage+= "tools and provide a single interface to system health checks."
82 + desc = "The emaint program provides an interface to system health " + \
83 + "checks and maintenance. See the emaint(1) man page for " + \
84 + "for additional information about the following commands:"
85
86 + usage += "\n\n"
87 + for line in textwrap.wrap(desc, 65):
88 + usage += "%s\n" % line
89 + usage += "\n"
90 + usage += " %s" % "all".ljust(15) + \
91 + "Perform all supported commands\n"
92 + for m in module_names[1:]:
93 + usage += " %s%s\n" % (m.ljust(15), modules[m].short_desc)
94
95 parser = OptionParser(usage=usage, version=portage.VERSION)
96 parser.add_option("-c", "--check", help="check for problems",
97
98 Modified: main/trunk/man/emaint.1
99 ===================================================================
100 --- main/trunk/man/emaint.1 2008-11-23 00:33:59 UTC (rev 12046)
101 +++ main/trunk/man/emaint.1 2008-11-23 04:23:54 UTC (rev 12047)
102 @@ -4,10 +4,32 @@
103 .SH SYNOPSIS
104 .BR emaint
105 [\fIoptions\fR]
106 -[\fBall\fR | \fBworld\fR]
107 +[\fBall\fR | \fBbinhost\fR | \fBcleanresume\fR | \
108 +\fBmovebin\fR | \fBmoveinst\fR | \fBworld\fR]
109 .SH DESCRIPTION
110 -.B emaint
111 -checks for and fixes problems in the portage \fIworld\fR file.
112 +The emaint program provides an interface to system health
113 +checks and maintenance.
114 +.SH COMMANDS
115 +.TP
116 +.BR all
117 +Perform all supported commands.
118 +.TP
119 +.BR binhost
120 +Generate a metadata index for binary packages located in \fBPKGDIR\fR (for
121 +download by remote clients). See the \fBPORTAGE_BINHOST\fR documentation in
122 +the \fBmake.conf\fR(5) man page for additional information.
123 +.TP
124 +.BR cleanresume
125 +Discard merge lists saved for the \fBemerge\fR(1) \fB--resume\fR action.
126 +.TP
127 +.BR movebin
128 +Perform package move updates for binary packages located in \fBPKGDIR\fR.
129 +.TP
130 +.BR moveinst
131 +Perform package move updates for installed packages.
132 +.TP
133 +.BR world
134 +Fix problems in the \fIworld\fR file.
135 .SH OPTIONS
136 .TP
137 .B \-c, \-\-check