Bug 484333 - RHEL5_PartData.__init__() is not passing some parameters to its parent class
Summary: RHEL5_PartData.__init__() is not passing some parameters to its parent class
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pykickstart
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Chris Lumens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-06 08:29 UTC by Alexander Todorov
Modified: 2009-06-02 14:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-02 14:31:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alexander Todorov 2009-02-06 08:29:30 UTC
Description of problem:
RHEL5_PartData.__init__() is not passing all arguments to its parent class FC4_PartData. The one I care about is --label. The result is that even if you provide a value in the ks.cfg it's not initialized.

Version-Release number of selected component (if applicable):
pykickstart-1.47-1.fc10

How reproducible:
Always

Steps to Reproduce:
#!/usr/bin/python

from pykickstart.handlers.rhel5 import RHEL5Handler

ks=RHEL5Handler()

part = ks.PartData(mountpoint="/test", fstype="ext3", size=100, grow=False, format=True, label="TESTLABEL")
ks.partition.add(part)

print ks
  
Actual results:
The above script is missing "--label" in it's output.

Expected results:
--label is present

Additional info:
The patch below adds two missing arguments for this class. This situation is fixed in pykickstart-1.48-1.fc11 and newer by using **kwargs to pass parameters to __init()__. I'd rather provide this or newer package from F11 to F10 instead of patching the old version. The new package will potentially fix other similar bugs that were not found yet.


--- partition.py.orig   2009-02-06 10:11:09.000000000 +0200
+++ partition.py        2009-02-06 10:14:38.000000000 +0200
@@ -117,6 +117,7 @@
                  bytesPerInode=4096, encrypted=False, passphrase=""):
         FC4_PartData.__init__(self, active=active, primOnly=primOnly,
                              end=end, fstype=fstype, grow=grow,
+                             label=label, fsopts=fsopts,
                              maxSizeMB=maxSizeMB, format=format,
                              onbiosdisk=onbiosdisk, disk=disk,
                              onPart=onPart, size=size, start=start,

Comment 1 Alexander Todorov 2009-02-06 12:29:50 UTC
FYI:
The F9_PartData class which derives from FC4_PartData /RHEL5_PartData parent class/ fixes the missing label argument by simply calling:
self.label = label instead of passing it to __init__ of the parent class.

Comment 2 Chris Lumens 2009-06-01 20:41:05 UTC
Do you still need an update release for F10 here?

Comment 3 Alexander Todorov 2009-06-02 06:34:28 UTC
If F11 uses the new **kwargs style of passing arguments you can close this.

Comment 4 Chris Lumens 2009-06-02 14:31:33 UTC
And it does.


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