Bug 520061

Summary: KeyError: 'ANACONDAVERSION' when running on installed system
Product: [Fedora] Fedora Reporter: Alexander Todorov <atodorov>
Component: anacondaAssignee: David Cantrell <dcantrell>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: anaconda-maint-list, vanmeeuwen+fedora
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-04 19:50:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 519665    
Attachments:
Description Flags
patch to fix this issue none

Description Alexander Todorov 2009-08-28 08:28:10 UTC
Description of problem:
When running anaconda on installed system:

Traceback (most recent call last):
  File "/usr/sbin/anaconda", line 978, in <module>
    initExceptionHandling(anaconda)
  File "/usr/lib/anaconda/exception.py", line 93, in initExceptionHandling
    conf = Config(programName="anaconda", programVersion=os.environ["ANACONDAVERSION"],
  File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__
    raise KeyError(key)
KeyError: 'ANACONDAVERSION'


Version-Release number of selected component (if applicable):
anaconda-12.17-1.fc12.i686

How reproducible:
Always

Steps to Reproduce:
1. mkdir /mnt/nbdroot
2. anaconda --text --rootpath=/mnt/nbdroot --method=http://fedora.nano-box.net/linux/development/i386/os/
 
Actual results:
Traceback

Expected results:
Anaconda will start in text mode and install packages under /mnt/nbdroot

Additional info:
The ANACONDAVERSION env variable is set in loader but it's not present when running anaconda on already installed system. This is preventing usage of anaconda to prepare netboot images/chroot.

This is a regression against F11 where anaconda is able to start (though it tracebacks at another place, see bug #519665)

Comment 1 Chris Lumens 2009-09-03 15:34:57 UTC
Created attachment 359697 [details]
patch to fix this issue

Does applying this patch to /usr/lib/anaconda fix the issue?

Comment 2 David Cantrell 2009-09-04 19:50:53 UTC
This will be fixed in anaconda-12.21-1.  Took a different approach from Chris' patch.  anaconda now has the isys.getAnacondaVersion() function to return the anaconda version number when needed.