[yum-commits] Branch 'yum-3_2_X' - 3 commits - docs/yum.8 output.py yum/__init__.py

James Antill james at osuosl.org
Tue Jan 25 17:13:05 UTC 2011


 docs/yum.8      |    8 ++++++--
 output.py       |    3 +++
 yum/__init__.py |    7 ++++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit f53b1e44e379091a9b993fd13086b1f9ff241838
Author: James Antill <james at and.org>
Date:   Tue Jan 25 10:43:44 2011 -0500

    Fully drop the rpmdb cache if the transaction failed, or was a test.

diff --git a/yum/__init__.py b/yum/__init__.py
index efe6f07..b384641 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1486,7 +1486,12 @@ class YumBase(depsolve.Depsolve):
 
         
         # drop out the rpm cache so we don't step on bad hdr indexes
-        self.rpmdb.dropCachedDataPostTransaction(list(self.tsInfo))
+        if (self.ts.isTsFlagSet(rpm.RPMTRANS_FLAG_TEST) or
+            resultobject.return_code):
+            self.rpmdb.dropCachedData()
+        else:
+            self.rpmdb.dropCachedDataPostTransaction(list(self.tsInfo))
+
         self.plugins.run('posttrans')
         # sync up what just happened versus what is in the rpmdb
         if not self.ts.isTsFlagSet(rpm.RPMTRANS_FLAG_TEST):
commit cbdc00c574738512835a440382af5a62bbbc48fa
Author: James Antill <james at and.org>
Date:   Mon Jan 24 10:31:49 2011 -0500

    Update docs about history packages-list.

diff --git a/docs/yum.8 b/docs/yum.8
index 52f6b53..3b414e2 100644
--- a/docs/yum.8
+++ b/docs/yum.8
@@ -73,7 +73,7 @@ gnome\-packagekit application\&.
 .br
 .I \fR * version [ all | installed | available | group-* | nogroups* | grouplist | groupinfo ]
 .br
-.I \fR * history [info|list|summary|redo|undo|new|addon-info] 
+.I \fR * history [info|list|packages-list|summary|redo|undo|new|addon-info] 
 .br
 .I \fR * check
 .br 
@@ -316,8 +316,12 @@ The undo/redo commands take either a transaction id or the keyword last and
 an offset from the last transaction (Eg. if you've done 250 transactions,
 "last" refers to transaction 250, and "last-4" refers to transaction 246).
 
+The addon-info command takes a transaction ID, and the packages-list command
+takes a package (with wildcards).
+
 In "history list" output the Altered column also gives some extra information
-if there was something not good with the transaction.
+if there was something not good with the transaction (this is also shown at the
+end of the package column in the packages-list command).
 
 .I \fB>\fR - The rpmdb was changed, outside yum, after the transaction.
 .br
commit c6d65666bda71416d885dc8dcf4fbd1b6099520d
Author: James Antill <james at and.org>
Date:   Mon Jan 24 10:31:34 2011 -0500

    Show error message when pkgs-list is given packages, but doesn't match.

diff --git a/output.py b/output.py
index b1d92e5..04b718b 100755
--- a/output.py
+++ b/output.py
@@ -1936,6 +1936,9 @@ to exit.
             of a package(s) instead of via. transactions. """
         tids = self.history.search(extcmds)
         limit = None
+        if extcmds and not tids:
+            self.logger.critical(_('Bad transaction IDs, or package(s), given'))
+            return 1, ['Failed history packages-list']
         if not tids:
             limit = 20
 


More information about the Yum-commits mailing list