This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 484333 - RHEL5_PartData.__init__() is not passing some parameters to its parent class
RHEL5_PartData.__init__() is not passing some parameters to its parent class
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pykickstart (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Chris Lumens
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-06 03:29 EST by Alexander Todorov
Modified: 2009-06-02 10:31 EDT (History)
2 users (show)

See Also:
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:


Attachments (Terms of Use)

  None (edit)
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):
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 07:29:50 EST
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 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.

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