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 > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 03-05-2010, 12:36 PM
Radek Vykydal
 
Default Reset comps/groups info after editing repo in UI (#555585)

The change is concerning tasksel step. As we are resetting selected groups in
following step (basepkgsel), we are safe to just reset the comps/groups with
YumBase.doGroupsSetup (if UI repo editing requires it) instead of only adding
groups of new repo - which was actually merging it with groups of old repo
- the bug. Note that editing repo means removing it and adding a new one.
---
iw/task_gui.py | 26 +++++++++++---------------
1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/iw/task_gui.py b/iw/task_gui.py
index 0a18da8..862788e 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -46,21 +46,6 @@ def setupRepo(anaconda, repo):
anaconda.backend.doRepoSetup(anaconda, thisrepo=repo.id, fatalerrors=False)
anaconda.backend.doSackSetup(anaconda, thisrepo=repo.id, fatalerrors=False)
log.info("added (UI) repository %s with source URL %s, id:%s" % (repo.name, repo.mirrorlist or repo.baseurl, repo.id))
- # FIXME: need a per-repo way of doing this; largely cut and paste
- # from yum right now
- if not repo.groups_added:
- try:
- groupfile = repo.getGroups()
- # open it up as a file object so iterparse can cope
- # with our gz file
- if groupfile is not None and groupfile.endswith('.gz'):
- groupfile = gzip.open(groupfile)
- anaconda.backend.ayum._comps.add(groupfile)
- except Exception, e:
- log.debug("unable to add group information for repository %s" %(repo.name))
- else:
- repo.groups_added = True
- log.info("added group information for repository %s" %(repo.name))
except (IOError, yum.Errors.RepoError) as e:
anaconda.intf.messageWindow(_("Error"),
_("Unable to read package metadata from repository. "
@@ -385,6 +370,17 @@ 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

--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-05-2010, 01:37 PM
Ales Kozumplik
 
Default Reset comps/groups info after editing repo in UI (#555585)

On 03/05/2010 02:36 PM, Radek Vykydal wrote:

The change is concerning tasksel step. As we are resetting selected groups in
following step (basepkgsel), we are safe to just reset the comps/groups with
YumBase.doGroupsSetup (if UI repo editing requires it) instead of only adding
groups of new repo - which was actually merging it with groups of old repo
- the bug. Note that editing repo means removing it and adding a new one.
---


Ack from me with my little package selection understanding.

_______________________________________________
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 04:54 PM.

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