diff options
author | Chris Lumens <clumens@redhat.com> | 2006-05-08 21:01:20 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2006-05-08 21:01:20 +0000 |
commit | 3ad903afe7a2f110d531fe4db004c48386369ba9 (patch) | |
tree | f4b7b0f805a22cdb9ec2b027b6b110a1760690f2 /yuminstall.py | |
parent | ca81cbae17d38cb178917562f8ffef43da8ce183 (diff) | |
download | anaconda-3ad903afe7a2f110d531fe4db004c48386369ba9.tar.gz anaconda-3ad903afe7a2f110d531fe4db004c48386369ba9.tar.xz anaconda-3ad903afe7a2f110d531fe4db004c48386369ba9.zip |
Support mirrorlist as well (still need to handle $ARCH though).
Diffstat (limited to 'yuminstall.py')
-rw-r--r-- | yuminstall.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/yuminstall.py b/yuminstall.py index eb832fa5c..1d9cba392 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -210,7 +210,8 @@ class simpleCallback: self.progress.processEvents() class AnacondaYumRepo(YumRepository): - def __init__( self, uri, repoid='anaconda%s' % productStamp): + def __init__( self, uri=None, mirrorlist=None, + repoid='anaconda%s' % productStamp): YumRepository.__init__(self, repoid) conf = yum.config.RepoConf() for k, v in conf.iteritems(): @@ -218,7 +219,11 @@ class AnacondaYumRepo(YumRepository): self.set(k, v) self.gpgcheck = False #self.gpgkey = "%s/RPM-GPG-KEY-fedora" % (method, ) - self.baseurl = [ uri ] + if uri and not mirrorlist: + self.baseurl = [ uri ] + elif mirrorlist and not uri: + self.mirrorlist = mirrorlist + self.set('cachedir', '/tmp/cache/') self.set('pkgdir', '/mnt/sysimage/') self.set('hdrdir', '/tmp/cache/headers') @@ -385,10 +390,14 @@ class AnacondaYum(YumSorter): self.conf.cachedir = '/tmp/cache/' #XXX: It'd be nice if the default repo was in the repoList repo = AnacondaYumRepo(self.method.getMethodUri()) + repo.enable() self.repos.add(repo) if self.anaconda.isKickstart: for ksrepo in self.anaconda.id.ksdata.repoList: - repo = AnacondaYumRepo(ksrepo.baseurl, repoid=ksrepo.name) + repo = AnacondaYumRepo(uri=ksrepo.baseurl, + mirrorlist=ksrepo.mirrorlist, + repoid=ksrepo.name) + repo.enable() self.repos.add(repo) self.repos.setCacheDir('/tmp/cache') @@ -668,7 +677,8 @@ class YumBackend(AnacondaBackend): "correctly generated. %s" % e), type="custom", custom_icon="error", custom_buttons=[_("_Exit")]) - sys.exit(0) + import pdb + pdb.set_trace() self.ayum.repos.callback = None self.ayum.repos.setFailureCallback((self.urlgrabberFailureCB, (), |