summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-02-29 17:16:53 -0500
committerChris Lumens <clumens@redhat.com>2008-03-04 13:00:32 -0500
commitd7b4046e681189d6d96668471454f5fe448ccdbe (patch)
tree872bd58bd2864fec1bcbb01f8d24eb0e6f6b331a /yuminstall.py
parentcd8a7a03397f431649f113936ffee6025dc90c33 (diff)
downloadanaconda-d7b4046e681189d6d96668471454f5fe448ccdbe.tar.gz
anaconda-d7b4046e681189d6d96668471454f5fe448ccdbe.tar.xz
anaconda-d7b4046e681189d6d96668471454f5fe448ccdbe.zip
Update the method string handling for NFS and URL installs.
yum doesn't understand nfs: and nfsiso: URLs, so we've been mangling them early in the anaconda file. Now with stage2=, we need to do this later because in the NFS case, we won't have the source repo mounted. Delay the mangling until we're doing repo setup, which is also where the NFS source will get mounted.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/yuminstall.py b/yuminstall.py
index f4ba51da7..7de9b0963 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -445,12 +445,19 @@ class AnacondaYum(YumSorter):
self.conf.cachedir = '/tmp/cache/'
self.conf.metadata_expire = 0
+ if self.anaconda.methodstr.startswith("nfs:"):
+ methodstr = "file:///mnt/source"
+ if not os.path.ismount("/mnt/source"):
+ isys.mount(self.anaconda.methodstr[4:], "/mnt/source", "nfs")
+ elif self.anaconda.methodstr.startswith("ftp:") or self.anaconda.methodstr.startswith("http:"):
+ methodstr = self.anaconda.methodstr
+
# set up logging to log to our logs
ylog = logging.getLogger("yum")
map(lambda x: ylog.addHandler(x), log.handlers)
# add default repos
- for (name, uri) in self.anaconda.id.instClass.getPackagePaths(self.anaconda.methodstr).items():
+ for (name, uri) in self.anaconda.id.instClass.getPackagePaths(methodstr).items():
rid = name.replace(" ", "")
repo = AnacondaYumRepo(uri, addon=False,
repoid="anaconda-%s-%s" %(rid, productStamp),