File anaconda-mount-hd-repo.patch of Package anaconda
From 8b329a0a014507f3431157b4dbffcdadcee8eb9f Mon Sep 17 00:00:00 2001
From: Gary Lin <glin@novell.com>
Date: Tue, 20 Apr 2010 17:11:41 +0800
Subject: [PATCH] mount hd repo
Signed-off-by: Gary Lin <glin@novell.com>
---
yuminstall.py | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/yuminstall.py b/yuminstall.py
index 25a445d..3519b8d 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -408,6 +408,20 @@ class AnacondaYum(YumSorter):
discImages=self._discImages)
self.currentMedia = discnum
+ def _mountHdRepo(self, discnum):
+ umountImage(self.tree, self.currentMedia)
+ self.currentMedia = None
+
+ # mountDirectory checks before doing anything, so it's safe to
+ # call this repeatedly.
+ mountDirectory(self.anaconda.methodstr,
+ self.anaconda.intf.messageWindow)
+
+ # bind the local source
+ isys.mount ("/mnt/isodir/yum-repo", "/mnt/source", bindMount = True)
+
+ self.currentMedia = discnum
+
def configBaseURL(self):
# We only have a methodstr if method= or repo= was passed to
# anaconda. No source for this base repo (the CD media, NFS,
@@ -429,7 +443,7 @@ class AnacondaYum(YumSorter):
self.isodir = "/mnt/isodir/%s" % path
# This takes care of mounting /mnt/isodir first.
- self._switchImage(1)
+ self._mountHdRepo(1);
self.mediagrabber = self.mediaHandler
elif m.startswith("nfsiso:"):
self.isodir = "/mnt/isodir"
--
1.6.0.2