summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-07-18 02:30:53 +0000
committerJeremy Katz <katzj@redhat.com>2006-07-18 02:30:53 +0000
commit9d409854150fb7c4ff7dc1ddf5a6d74b91b847ea (patch)
tree4a303ef5e284a33018a0df0ac5c8ae25119be444 /yuminstall.py
parent9ba0ffafac530c5c74aabac04e8a53a35265d304 (diff)
downloadanaconda-9d409854150fb7c4ff7dc1ddf5a6d74b91b847ea.tar.gz
anaconda-9d409854150fb7c4ff7dc1ddf5a6d74b91b847ea.tar.xz
anaconda-9d409854150fb7c4ff7dc1ddf5a6d74b91b847ea.zip
2006-07-17 Jeremy Katz <katzj@redhat.com>
* yuminstall.py (AnacondaYum.doConfigSetup): Using metadata_expire doesn't make sense for anaconda (YumBackend.doRepoSetup): Allow setup of a single repo, reorganize so that this works * iw/task_gui.py (TaskWindow._addRepo): Support for adding repos. * ui/tasksel.glade: Add button to bring up add repo dialopg * ui/addrepo.glade: Initial pass at dialog for adding additional repos.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py34
1 files changed, 18 insertions, 16 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 9eef68225..531774fe3 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -353,6 +353,7 @@ class AnacondaYum(YumSorter):
self.conf.exclude=["*debuginfo*"]
self.conf.cache=0
self.conf.cachedir = '/tmp/cache/'
+ self.conf.metadata_expire = 0
#XXX: It'd be nice if the default repo was in the repoList
repo = AnacondaYumRepo(self.method.getMethodUri())
@@ -614,38 +615,36 @@ class YumBackend(AnacondaBackend):
if self.ayum.comps._groups.has_key("xen"):
del self.ayum.comps._groups["xen"]
- def doRepoSetup(self, anaconda):
+ def doRepoSetup(self, anaconda, thisrepo = None, fatalerrors = True):
anaconda.method.switchMedia(1)
if not os.path.exists("/tmp/cache"):
iutil.mkdirChain("/tmp/cache/headers")
- tasks = ( (self.ayum.doMacros, 1),
- (self.ayum.doTsSetup, 1),
- (self.ayum.doRpmDBSetup, 5),
- (self.ayum.doRepoSetup, 15),
- (self.doGroupSetup, 1),
- (self.ayum.doSackSetup, 50),
- (self._catchallCategory, 1))
+ self.ayum.doMacros()
+ self.ayum.doTsSetup()
+ self.ayum.doRpmDBSetup()
+
+ longtasks = ( (self.ayum.doRepoSetup, 4),
+ (self.ayum.doSackSetup, 6) )
tot = 0
- for t in tasks:
+ for t in longtasks:
tot += t[1]
- waitwin = YumProgress(anaconda.intf, _("Retrieving installation information..."),
- tot)
+ waitwin = YumProgress(anaconda.intf, _("Retrieving installation information..."), tot)
self.ayum.repos.callback = waitwin
try:
- at = 0
- for (task, amt) in tasks:
- waitwin.set_incr(amt)
- task()
- at += amt
+ for (task, incr) in longtasks:
+ waitwin.set_incr(incr)
+ task(thisrepo = thisrepo)
waitwin.next_task()
waitwin.pop()
except RepoError, e:
log.error("reading package metadata: %s" %(e,))
waitwin.pop()
+ if not fatalerrors:
+ raise RepoError, e
anaconda.intf.messageWindow(_("Error"),
_("Unable to read package metadata. This may be "
"due to a missing repodata directory. Please "
@@ -655,6 +654,9 @@ class YumBackend(AnacondaBackend):
custom_buttons=[_("_Exit")])
sys.exit(0)
+ self.doGroupSetup()
+ self._catchallCategory()
+
self.ayum.repos.callback = None
self.ayum.repos.setFailureCallback((self.urlgrabberFailureCB, (),
{"intf":anaconda.intf, "tsInfo":self.ayum.tsInfo}))