Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96804 - Saving a profile with gtkfe works but loading it again fails.
Summary: Saving a profile with gtkfe works but loading it again fails.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Installer (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux Installer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-22 13:44 UTC by Steven Mertens
Modified: 2006-03-24 13:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
tiny patch against GLIInstallProfile.py (GLIInstallProfile.diff.py,946 bytes, patch)
2005-06-22 13:46 UTC, Steven Mertens
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Mertens 2005-06-22 13:44:35 UTC
The problem :

Saving a profile with gtkfe works but loading it again fails.

The reason :

It fails in the add_partitions_device_partition() methode of the
InstallProfile class.
The int conversion on the free partition minor fails.

 => part_entry['minor'] = int(part_entry['minor'])

In case of a part_entry with type free,  part_entry['minor'] returns
a string like '2.03125'. A int conversion on such a string fails.

I wrote a very tiny patch that checks the part type, if free it uses
float() for conversion , if something else it uses int().


example :


>>> mystring = '2.03125'
>>> int(mystring)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: invalid literal for int(): 2.03125
>>> float(mystring)
2.03125
>>> int(float(mystring))
2




Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Steven Mertens 2005-06-22 13:46:10 UTC
Created attachment 61735 [details, diff]
tiny patch against GLIInstallProfile.py

tiny patch against GLIInstallProfile.py

against snapshot 20050622
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2005-06-22 14:24:41 UTC
Instead of the int/float distinction, I just changed the int() to a float().
Representing a whole number with a float isn't a problem. Fixed in cvs. Thanks.
Comment 3 Jeffrey Forman (RETIRED) gentoo-dev 2006-03-24 13:46:30 UTC
Moving to Release Media/Installer.