FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-09-2012, 08:43 PM
David Lehman
 
Default Threading yum only requires us to drop package sacks.

Doing a YumBase.close() leads to problems when you try to resume
use of that instance. Resetting the package sacks does not appear
to present any such problems.
---
pyanaconda/packaging/yumpayload.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index b36410d..0d02c2a 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -150,7 +150,6 @@ class YumPayload(PackagePayload):

with _yum_lock:
if self._yum:
- self._yum.close()
del self._yum

self._yum = yum.YumBase()
@@ -264,7 +263,15 @@ reposdir=%s
% ",".join([r.id for r in self._yum.repos.listEnabled()]))

def release(self):
- self._yum.close()
+ from yum.packageSack import MetaSack
+ log.debug("deleting package sacks")
+ if hasattr(self._yum, "_pkgSack"):
+ self._yum._pkgSack = None
+
+ self._yum.repos.pkgSack = MetaSack()
+
+ for repo in self._yum.repos.repos.values():
+ repo._sack = None

###
### METHODS FOR WORKING WITH REPOSITORIES
@@ -789,6 +796,7 @@ reposdir=%s
log.info("checking software selection")

with _yum_lock:
+ self.release()
self._yum._undoDepInstalls()

self._applyYumSelections()
--
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org