[yum-commits] yum-complete-transaction.py
James Antill
james at osuosl.org
Wed Oct 2 16:24:18 UTC 2013
yum-complete-transaction.py | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 282c26b4175698e8ed8c0e8aaccb32d416e95a0b
Author: James Antill <james at and.org>
Date: Wed Oct 2 12:23:56 2013 -0400
Don't remove pkgs which are already removals (Eg. via. updates). BZ 1013475.
diff --git a/yum-complete-transaction.py b/yum-complete-transaction.py
index 3a9f305..6b01e4e 100755
--- a/yum-complete-transaction.py
+++ b/yum-complete-transaction.py
@@ -21,6 +21,7 @@ import yum
from yum.misc import setup_locale
from utils import YumUtilBase
+from yum.constants import TS_REMOVE_STATES
import logging
import os
@@ -204,6 +205,12 @@ class YumCompleteTransaction(YumUtilBase):
if action == 'erase':
(e, m, u) = self.rpmdb.matchPackageNames([pkgspec])
for pkg in e:
+ pkgtuple = (pkg.name, pkg.arch, pkg.epoch, pkg.ver, pkg.rel)
+ # Skip processing if already marked as the one to be removed.
+ # This will elimate issue with tx_member removal when package
+ # marked as: 'ud' out of of "install" journal's entry
+ if self.tsInfo.getMembersWithState(pkgtuple, TS_REMOVE_STATES):
+ continue
self.remove(po=pkg)
More information about the Yum-commits
mailing list