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 > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 11-12-2008, 10:49 PM
Dave Lehman
 
Default Add comps groups for new repos that are added (#470653)

On Wed, 2008-11-12 at 17:55 -0500, Jeremy Katz wrote:
> (And now, for the tested version :-)
>
> For new repos that are added, we should also be sure to add their comps
> information to the base comps object. This largely cut and pastes bits from
> yum's doGroupSetup(), but that can't be done on a per-repo basis. We should
> add some API, but this will do for now
> ---
> iw/task_gui.py | 16 ++++++++++++++++
> 1 files changed, 16 insertions(+), 0 deletions(-)


Looks good to me.

Dave

>
> diff --git a/iw/task_gui.py b/iw/task_gui.py
> index 8296e83..5f3c8b6 100644
> --- a/iw/task_gui.py
> +++ b/iw/task_gui.py
> @@ -21,6 +21,7 @@ import gtk
> import gtk.glade
> import gobject
> import gui
> +import gzip
> from iw_gui import *
> from image import *
> from constants import *
> @@ -43,6 +44,21 @@ 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 repository %s with with source URL %s" % (repo.name, repo.mirrorlist or repo.baseurl))
> + # 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 yum.Errors.RepoError, e:
> anaconda.intf.messageWindow(_("Error"),
> _("Unable to read package metadata from repository. "



_______________________________________________
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 10:35 PM.

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