From: "Brian C. Lane" bcl@redhat.com
Searching for an empty string inside of another string always returns True. It wasn't properly detecting whether dracut had setup the nfs repo. --- pyanaconda/packaging/yumpayload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index e65ed5d..1555bf0 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -601,7 +601,7 @@ reposdir=%s options, host, path = iutil.parseNfsUrl('nfs:%s' % isodev) # See if the dir holding the iso is what we want # and also if we have an iso mounted to /run/install/repo - if path in isodev and DRACUT_ISODIR in device: + if path and path in isodev and DRACUT_ISODIR in device: # Everything should be setup url = "file://" + DRACUT_REPODIR else: @@ -609,7 +609,7 @@ reposdir=%s needmount = True if device: options, host, path = iutil.parseNfsUrl('nfs:%s' % device) - if path in device: + if path and path in device: needmount = False path = DRACUT_REPODIR if needmount:
From: "Brian C. Lane" bcl@redhat.com
It was trying to mount the nfs path including the file.iso, so strip that off before passing it to _setupNFS. --- pyanaconda/packaging/yumpayload.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 1555bf0..752cc1d 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -615,7 +615,11 @@ reposdir=%s if needmount: # Mount the NFS share on INSTALL_TREE. If it ends up # being nfsiso we will move the mountpoint to ISO_DIR. - self._setupNFS(INSTALL_TREE, method.server, method.dir, + if method.dir.endswith(".iso"): + nfsdir = os.path.dirname(method.dir) + else: + nfsdir = method.dir + self._setupNFS(INSTALL_TREE, method.server, nfsdir, method.opts) path = INSTALL_TREE
Both look okay to me.
On Thu, 2012-12-20 at 13:36 -0800, Brian C. Lane wrote:
From: "Brian C. Lane" bcl@redhat.com
Searching for an empty string inside of another string always returns True. It wasn't properly detecting whether dracut had setup the nfs repo.
pyanaconda/packaging/yumpayload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index e65ed5d..1555bf0 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -601,7 +601,7 @@ reposdir=%s options, host, path = iutil.parseNfsUrl('nfs:%s' % isodev) # See if the dir holding the iso is what we want # and also if we have an iso mounted to /run/install/repo
if path in isodev and DRACUT_ISODIR in device:
if path and path in isodev and DRACUT_ISODIR in device: # Everything should be setup url = "file://" + DRACUT_REPODIR else:@@ -609,7 +609,7 @@ reposdir=%s needmount = True if device: options, host, path = iutil.parseNfsUrl('nfs:%s' % device)
if path in device:
if path and path in device: needmount = False path = DRACUT_REPODIR if needmount:
anaconda-patches@lists.fedorahosted.org