[Yum-devel] [PATCH] Document the secret end column of history list, giving away all our sekretz!

James Antill james at and.org
Thu Dec 10 19:34:15 UTC 2009


---
 docs/yum.8 |   13 +++++++++++++
 output.py  |   20 ++++++++++----------
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/docs/yum.8 b/docs/yum.8
index 6ba873e..ced16e3 100644
--- a/docs/yum.8
+++ b/docs/yum.8
@@ -248,6 +248,19 @@ The info/list/summary commands take either a transactions id or a package (with
 wildcards, as in \fBSpecifying package names\fP), all three can also be passed
 no arguments. list can be passed the keyword "all" to list all the transactions.
 undo/redo just take a transaction id.
+
+In "history list" output the Altered column also gives some extra information
+if there was something not good with the transaction.
+
+.I \fB>\fR - The rpmdb was changed, outside yum, after the transaction.
+.br
+.I \fB<\fR - The rpmdb was changed, outside yum, before the transaction.
+.br
+.I \fB*\fR - The transaction aborted before completion.
+.br
+.I \fB#\fR - The transaction completed, but with a non-zero status.
+.br
+
 .IP
 .IP "\fBhelp\fP"
 Produces help, either for all commands or if given a command name then the help
diff --git a/output.py b/output.py
index a59ca66..b748ef9 100755
--- a/output.py
+++ b/output.py
@@ -1271,16 +1271,16 @@ to exit.
             num, uiacts = self._history_uiactions(old.trans_data)
             name   = utf8_width_fill(name,   22, 22)
             uiacts = utf8_width_fill(uiacts, 14, 14)
-            if old.altered_lt_rpmdb and old.altered_gt_rpmdb:
-                print fmt % (old.tid, name, tm, uiacts, num), "><"
-            elif old.return_code is None:
-                print fmt % (old.tid, name, tm, uiacts, num), "**"
-            elif old.altered_lt_rpmdb:
-                print fmt % (old.tid, name, tm, uiacts, num), " <"
-            elif old.altered_gt_rpmdb:
-                print fmt % (old.tid, name, tm, uiacts, num), "> "
-            else:
-                print fmt % (old.tid, name, tm, uiacts, num)
+            rmark = lmark = ' '
+            if old.return_code is None:
+                rmark = lmark = '*'
+            elif old.return_code:
+                rmark = lmark = '#'
+            if old.altered_lt_rpmdb:
+                rmark = '<'
+            if old.altered_gt_rpmdb:
+                lmark = '>'
+            print fmt % (old.tid, name, tm, uiacts, num), "%s%s" % (lmark,rmark)
         lastdbv = self.history.last()
         if lastdbv is not None:
             #  If this is the last transaction, is good and it doesn't
-- 
1.6.5.2



More information about the Yum-devel mailing list