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 > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 06-22-2010, 01:27 PM
Chris Lumens
 
Default Force the comps object to be reloaded after adding repos (#606765).

This will make it so the repo metadata from any new or changed repos will be
merged in, therefore making groups selectable in the UI. There are simply
too many places where a repo can be modified to conditionalize this so
hopefully it does not take too long.
---
iw/task_gui.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/iw/task_gui.py b/iw/task_gui.py
index ded1008..8f9b4c8 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -505,6 +505,12 @@ class TaskWindow(InstallWindow):
else:
self.dispatch.skipStep("group-selection", skip = 1)

+ # If we've added repos, clear out the comps object. This will force
+ # yum to reload it on the next access instead of using the cached value,
+ # which will not contain the group information for any repos selected
+ # through the UI.
+ self.ayum.comps = None
+
tasks = self.xml.get_widget("taskList").get_model()
for (cb, task, grps) in filter(lambda x: not x[0], tasks):
map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
--
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-23-2010, 10:53 AM
Radek Vykydal
 
Default Force the comps object to be reloaded after adding repos (#606765).

Chris Lumens wrote:

This will make it so the repo metadata from any new or changed repos will be
merged in, therefore making groups selectable in the UI. There are simply
too many places where a repo can be modified to conditionalize this so
hopefully it does not take too long.
---
iw/task_gui.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)



Looks good to me.

Just a note - this code that does the same after repo is added/edited in UI
(using deprecated doGroupSetup which sets comps to None and reloads
group info immediately) could go away then, but this is probably not the
right

time to do it.

diff --git a/iw/task_gui.py b/iw/task_gui.py
index 8f9b4c8..c3cc800 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -384,17 +384,6 @@ class RepoEditor:
log.warning("error removing cachedir for %s: %s"
%(self.repo, e))

pass

- if (newRepoObj.enablegroups or
- (removeOld and self.repo.enablegroups)):
- # update groups information
- try:
- self.anaconda.backend.ayum.doGroupSetup()
- except Exception as e:
- log.debug("unable to reset group information after
UI repo edit: %s"

- % e)
- else:
- log.info("group information reset after UI repo edit")
-
self.repo = newRepoObj
break

_______________________________________________
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 06:14 AM.

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