Store mapping from pv/raid names used in ks (e.g. pv.1) to existing partitions in ks handler and use it when processing ks commands referring to the names. --- kickstart.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/kickstart.py b/kickstart.py index 844e58c..47ccd66 100644 --- a/kickstart.py +++ b/kickstart.py @@ -685,6 +685,9 @@ class Partition(commands.partition.F9_Partition): if not device: raise KickstartValueError, formatErrorMsg(self.lineno, msg="Specified nonexistent partition %s in partition command" % pd.onPart) + # store mapping for other ks partitioning commands + if kwargs.has_key("name"): + self.handler.onPart[kwargs["name"]] = pd.onPart devicetree.registerAction(ActionCreateFormat(device, kwargs["format"])) else: request = storage.newPartition(**kwargs) @@ -879,6 +882,8 @@ class VolGroup(commands.volgroup.FC3_VolGroup): # Get a list of all the physical volume devices that make up this VG. for pv in vgd.physvols: + # if pv is using --onpart, use original device + pv = self.handler.onPart.get(pv, pv) dev = devicetree.getDeviceByName(pv) if not dev: raise KickstartValueError, formatErrorMsg(self.lineno, msg="Tried to use undefined partition %s in Volume Group specification" % pv) @@ -1027,6 +1032,7 @@ class AnacondaKSHandler(superclass): self.showSteps = [] self.anaconda = anaconda self.id = self.anaconda.id + self.onPart = {} class EarlyKSHandler(superclass): # This handler class only processes a couple kickstart commands. It is -- 1.5.4.3 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list