On 05/02/2011 05:18 PM, Chris Lumens wrote:
@@ -249,9 +249,9 @@ class Bootloader(commands.bootloader.F15_Bootloader):
self.anaconda.bootloader.update_only = True
if location is None:
- self.anaconda.ksdata.permanentSkipSteps.append("instbootloader")
+ self.anaconda.dispatch.skipStep("instbootloader", permanent=1)
else:
- self.anaconda.ksdata.showSteps.append("bootloader")
+ self.anaconda.dispatch.skipStep("bootloader", skip=0)
if self.appendLine:
args = self.appendLine.split()
@@ -276,7 +276,8 @@ class Bootloader(commands.bootloader.F15_Bootloader):
self.anaconda.bootloader.drive_order = self.driveorder
- self.anaconda.ksdata.permanentSkipSteps.extend(["upgbootloader", "bootloader"])
+ map(lambda step: self.anaconda.dispatch.skipStep(step, permanent=1),
+ ["upgbootloader", "bootloader"])
Careful here - note above that bootloader is added to showSteps, which
gets processed after skipSteps in the setSteps method. Because of how
this Bootloader class is arranged, you're going to have to guard that
last map from ever happening, or the bootloader step will get skipped
when it shouldn't be.
I pushed this already but came across something that I have to comment
on (it will be relevant once I post a patch clearing all of this mess
away): in the original revision of the file (before my patches, which
didn't change this at the end anyway), we do
1) call dispatch.skipStep on all steps in skipSteps list
2) call dispatch.skipStep with permanent=1 on all steps in
permanentSkipSteps
3) call dispatch.skipStep with skip=0 (i.e. unskip) on all steps in
showSteps
But Dispatcher.skipStep() ignores any changes of the skip/unskip state
once something is marked as permanently skipped. So adding "bootloader"
to showSteps makes no difference because it's added to
permanentSkipSteps too. (it doesn't make sense for one more reason and
that is if the user specifies the installation location and everything
then why show the bootloader screen).
This is great news because I will be able to remove a lot of those
calls, maybe even remove the second setSteps() method again.
Ales
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list