Bug 696724 - findFirstIsoImage doesn't return the right value
Summary: findFirstIsoImage doesn't return the right value
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Chris Lumens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F15Blocker, F15FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2011-04-14 18:00 UTC by Chris Lumens
Modified: 2011-04-15 17:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-15 17:51:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Chris Lumens 2011-04-14 18:00:00 UTC
We're hitting an error where findFirstIsoImage returns a closed file handle instead of the filename of the first image.  This is showing up in spot's weirdo ISO-within-ISO thing, but I think it would hit anyone doing an HDISO install.  Don't know why it's not turned up yet.

The following patch fixes it:

diff --git a/pyanaconda/image.py b/pyanaconda/image.py
index 180ac7f..90a264b 100644
--- a/pyanaconda/image.py
+++ b/pyanaconda/image.py
@@ -34,8 +34,8 @@ def findFirstIsoImage(path, messageWindow):
     files = os.listdir(path)
     arch = _arch
 
-    for f in files:
-        what = path + '/' + f
+    for fn in files:
+        what = path + '/' + fn
         log.debug("Checking %s" % (what))
         if not isys.isIsoImage(what):
             continue
@@ -78,16 +78,16 @@ def findFirstIsoImage(path, messageWindow):
                    "\n\n"
                    "It is recommended that you exit and abort your "
                    "installation, but you can choose to continue if "
-                   "you think this is in error.") % (f,),
+                   "you think this is in error.") % (fn,),
                    type="custom", custom_icon="warning",
                    custom_buttons= [_("_Exit installer"),
                                     _("_Continue")])
             if rc == 0:
                 sys.exit(0)
 
-        log.info("Found disc at %s" % f)
+        log.info("Found disc at %s" % fn)
         isys.umount("/mnt/install/cdimage", removeDir=False)
-        return f
+        return fn
 
     return None

Comment 1 Adam Williamson 2011-04-15 17:40:12 UTC
Discussed at the 2011-04-15 blocker review meeting. We are uncertain why plain hard disk ISO install seems to succeed without this fix (as per Beta RC2 install test results, tested by rhe); clumens expected this bug to cause them to fail. But we accept this as a blocker on the basis we can't be confident HD ISO install works without the fix, per criterion "The installer must be able to use all supported local and remote package source options".



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Chris Lumens 2011-04-15 17:51:38 UTC
Ugh, sorry for the distraction but this is totally unnecessary for F15.  I was having spot test an image built locally that used an anaconda from rawhide - not F15.  So this was a bug only in rawhide.  That explains why we weren't seeing it in any of our F15 HDISO testing - because it's not a bug there.  But hey, at least we squashed an F16 blocker before it ever happened.


Note You need to log in before you can comment on or make changes to this bug.