Bug 243121 - text mode upgrade crashes with IndexError: string index out of range in upgrade_bootloader_text.py
text mode upgrade crashes with IndexError: string index out of range in upgra...
Status: CLOSED DUPLICATE of bug 241991
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
7
i386 Linux
low Severity low
: ---
: ---
Assigned To: Anaconda Maintenance Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-07 09:13 EDT by Alexander Woick
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-07 10:09:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Alexander Woick 2007-06-07 09:13:27 EDT
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 09:13:27 EDT
Created attachment 156459 [details]
anaconda dump
Comment 2 Chris Lumens 2007-06-07 10:09:44 EDT

*** 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.