summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2009-10-13 15:08:45 +0200
committerRadek Vykydal <rvykydal@redhat.com>2009-10-13 15:08:45 +0200
commite3e679568d3b1b6dba88007ec7c30bd4d44283cf (patch)
tree5050e5fd4c4e51589d9a4b8534c9613808ce35ec /yuminstall.py
parentc685457b4598818ef105b3de1e1a9be670412e00 (diff)
downloadanaconda-e3e679568d3b1b6dba88007ec7c30bd4d44283cf.tar.gz
anaconda-e3e679568d3b1b6dba88007ec7c30bd4d44283cf.tar.xz
anaconda-e3e679568d3b1b6dba88007ec7c30bd4d44283cf.zip
Handle Installation Repo (base repo) as any other in repo edit UI.
With present UI, edit repos, not base repos (methodstr). Works with assumption that base repo (repo/method) url points to a single repo, which is true for Fedora (as opposed to RHEL5 where we various repos in directories). dgregor told me that the target for RHEL6 is to have just one repo and handle product differentiation by comps. If we had to work with multirepo base urls, the UI for repo editing would need to be redesigned and rewritten because now we are mixing base urls with repo urls there.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py22
1 files changed, 5 insertions, 17 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 26efd5433..1c54318fa 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -480,7 +480,7 @@ class AnacondaYum(YumSorter):
# default to using whatever's enabled in /etc/yum.repos.d/
self._baseRepoURL = None
- def configBaseRepo(self, root='/', replace=False):
+ def configBaseRepo(self, root='/'):
# Create the "base" repo object, assuming there is one. Otherwise we
# just skip all this and use the defaults from /etc/yum.repos.d.
if not self._baseRepoURL:
@@ -493,19 +493,9 @@ class AnacondaYum(YumSorter):
for (name, uri) in self.anaconda.id.instClass.getPackagePaths(self._baseRepoURL).items():
rid = name.replace(" ", "")
- if replace:
- try:
- repo = self.repos.getRepo("anaconda-%s-%s" % (rid, productStamp))
- repo.baseurl = uri
- repo.anacondaBaseURLs = anacondabasepaths[name]
- except RepoError:
- replace = False
-
- # If there was an error finding the "base" repo, create a new one now.
- if not replace:
- repo = AnacondaYumRepo("anaconda-%s-%s" % (rid, productStamp))
- repo.baseurl = uri
- repo.anacondaBaseURLs = anacondabasepaths[name]
+ repo = AnacondaYumRepo("anaconda-%s-%s" % (rid, productStamp))
+ repo.baseurl = uri
+ repo.anacondaBaseURLs = anacondabasepaths[name]
repo.name = name
repo.cost = 100
@@ -515,9 +505,7 @@ class AnacondaYum(YumSorter):
log.info("set mediaid of repo %s to: %s" % (rid, repo.mediaid))
repo.enable()
-
- if not replace:
- self.repos.add(repo)
+ self.repos.add(repo)
def mediaHandler(self, *args, **kwargs):
mediaid = kwargs["mediaid"]