Bug 484333

Summary: RHEL5_PartData.__init__() is not passing some parameters to its parent class
Product: [Fedora] Fedora Reporter: Alexander Todorov <atodorov>
Component: pykickstartAssignee: Chris Lumens <clumens>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: clumens, jlaska
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-02 10:31:33 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Alexander Todorov 2009-02-06 03:29:30 EST
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):

How reproducible:

Steps to Reproduce:

from pykickstart.handlers.rhel5 import RHEL5Handler


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

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 07:29:50 EST
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 16:41:05 EDT
Do you still need an update release for F10 here?
Comment 3 Alexander Todorov 2009-06-02 02:34:28 EDT
If F11 uses the new **kwargs style of passing arguments you can close this.
Comment 4 Chris Lumens 2009-06-02 10:31:33 EDT
And it does.