[yum-git] yum/__init__.py
James Antill
james at linux.duke.edu
Wed Apr 23 05:22:03 UTC 2008
yum/__init__.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit a726a9d7652fff46000b5ac19de50416ef342719
Author: James Antill <james at and.org>
Date: Wed Apr 23 01:21:08 2008 -0400
Fix C-c again, bug#442232 and probably rhbz#240138
diff --git a/yum/__init__.py b/yum/__init__.py
index 1b5f107..6c8ad25 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -633,6 +633,10 @@ class YumBase(depsolve.Depsolve):
self.pkgSack.dropCachedData()
self.rpmdb.dropCachedData()
+ # We _must_ get rid of all the used tses before we go on, so that C-c
+ # works for downloads / mirror failover etc.
+ self.rpmdb.ts = None
+
# if depsolve failed and skipbroken is enabled
# The remove the broken packages from the transactions and
# Try another depsolve
@@ -2704,7 +2708,13 @@ class YumBase(depsolve.Depsolve):
return
toremove = []
- (cur_kernel_v, cur_kernel_r) = misc.get_running_kernel_version_release(self.ts)
+ # We "probably" want to use either self.ts or self.rpmdb.ts if either
+ # is available. However each ts takes a ref. on signals generally, and
+ # SIGINT specifically, so we _must_ have got rid of all of the used tses
+ # before we try downloading. This is called from buildTransaction()
+ # so self.rpmdb.ts should be valid.
+ ts = self.rpmdb.readOnlyTS()
+ (cur_kernel_v, cur_kernel_r) = misc.get_running_kernel_version_release(ts)
for instpkg in self.conf.installonlypkgs:
for m in self.tsInfo.getMembers():
if (m.name == instpkg or instpkg in m.po.provides_names) \
More information about the Yum-cvs-commits
mailing list