[f18-branch/master 1/2] fixup nfs repo install code (#879187)

Brian C. Lane bcl at redhat.com
Thu Dec 20 21:36:09 UTC 2012


From: "Brian C. Lane" <bcl at 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:
-- 
1.8.0.2



More information about the anaconda-patches mailing list