[Yum-devel] [PATCH] If verifyTransaction detects that a removal was not successful, it will now set the output_state of the pkg to TS_FAILED. BZ 661962

Nick Jacek njacek at redhat.com
Wed Jun 15 18:38:36 UTC 2011


Since the output_state will be TS_FAILED rather than just remaining
TS_ERASE, yum will now correctly say that the removal failed instead of
saying that the package was removed.
---
 yum/__init__.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/yum/__init__.py b/yum/__init__.py
index a0c6b9d..29be93d 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1650,6 +1650,7 @@ class YumBase(depsolve.Depsolve):
                         # but raising an exception is not going to do any good
                         self.logger.critical(_('%s was supposed to be removed' \
                                                ' but is not!' % txmbr.po))
+                        txmbr.output_state = TS_FAILED
                         continue
                 yumdb_item = self.rpmdb.yumdb.get_package(po=txmbr.po)
                 yumdb_item.clean()
-- 
1.7.5.2



More information about the Yum-devel mailing list