Bug 243121 - text mode upgrade crashes with IndexError: string index out of range in upgrade_bootloader_text.py
Summary: text mode upgrade crashes with IndexError: string index out of range in upgra...
Keywords:
Status: CLOSED DUPLICATE of bug 241991
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 7
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-07 13:13 UTC by Alexander Woick
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-07 14:09:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
anaconda dump (78.93 KB, text/plain)
2007-06-07 13:13 UTC, Alexander Woick
no flags Details

Description Alexander Woick 2007-06-07 13:13:27 UTC
Description of problem:
When doing a text mode upgrade of fc5 to f7, anaconda crashes with this error:

Traceback (most recent call first):
  File "/usr/lib/anaconda/textw/upgrade_bootloader_text.py", line 46, in
_ideToLibata
    if l.strip()[0] == "#":
  File "/usr/lib/anaconda/textw/upgrade_bootloader_text.py", line 58, in __call__
    newToLibata = self._ideToLibata(anaconda.rootPath)
  File "/usr/lib/anaconda/text.py", line 582, in run
    rc = win(self.screen, instance)
  File "/usr/bin/anaconda", line 955, in <module>
    anaconda.intf.run(anaconda)
IndexError: string index out of range


How reproducible:
- have a Fedora Core 5 system (probably fine with any upgradeable system with
kernel 2.6)
- have an empty line in /etc/modprobe.conf
- perform the upgrade to f7 in text mode

Steps to Reproduce:
1. have a Fedora Core 5 system (probably fine with any upgradeable system with
kernel 2.6) to upgrade
2. put an empty line into /etc/modprobe.conf of the original system
2. start Fedora 7 upgrade in text mode (graphical mode runs fine)
3. when anaconda comes to the bootloader configuration/upgrade, it crashes.
4. if you remove all empty lines from /etc/modprobe.conf, the installation runs
fine.

Actual results:
The above trace appears and the installation aborts.

Expected results:
installation continues.

Additional info:
After reviewing the offending line in
/usr/lib/anaconda/textw/upgrade_bootloader_text.py, it seems to me that this
part scans /etc/modprobe.conf and tries to skip commented lines. But empty lines
are not handled. Empty lines have no character at index 0, so the function traps.

Suggested fix:
Handle empty lines in the _ideToLibata function of
/usr/lib/anaconda/textw/upgrade_bootloader_text.py. I don't know python, so I
cannot tell how such a line may look like.

Comment 1 Alexander Woick 2007-06-07 13:13:27 UTC
Created attachment 156459 [details]
anaconda dump

Comment 2 Chris Lumens 2007-06-07 14:09:44 UTC

*** This bug has been marked as a duplicate of 241991 ***


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