ack On Mon, 2011-08-08 at 09:53 +0200, Ales Kozumplik wrote: > 1) One more place where the "bootloader" step had been skipped previously. > 2) Do not insist on scheduling early steps for upgrade (we might be past > them). > 3) Do not insist on requesting "cleardiskssel" in autopart_type: for > upgrades it is always skipped. > > Also see 8387584c5bfebb76ad68f86f51c643c74b8d1efd. > > Resolves: rhbz#728122 > Resolves: rhbz#728188 > Resolves: rhbz#723798 > --- > pyanaconda/dispatch.py | 10 ++++++++++ > pyanaconda/iw/autopart_type.py | 6 ++++-- > pyanaconda/upgrade.py | 11 ++++++++--- > 3 files changed, 22 insertions(+), 5 deletions(-) > > diff --git a/pyanaconda/dispatch.py b/pyanaconda/dispatch.py > index 900950f..926d2fa 100644 > --- a/pyanaconda/dispatch.py > +++ b/pyanaconda/dispatch.py > @@ -309,6 +309,16 @@ class Dispatcher(object): > def schedule_steps(self, *steps): > changes = map(lambda s: self.steps[s].schedule(self._current_step()), steps) > > + def schedule_steps_gently(self, *steps): > + """ Schedules steps and won't raise an error if it is not possible for > + some of them. > + """ > + for step in steps: > + try: > + self.schedule_steps(step) > + except errors.DispatchError as e: > + log.debug("dispatch: %s" % e) > + > def step_disabled(self, step): > """ True if step is not yet scheduled to be run or will never be run > (i.e. is skipped). > diff --git a/pyanaconda/iw/autopart_type.py b/pyanaconda/iw/autopart_type.py > index 999c281..47e089d 100644 > --- a/pyanaconda/iw/autopart_type.py > +++ b/pyanaconda/iw/autopart_type.py > @@ -163,7 +163,7 @@ class PartitionTypeWindow(InstallWindow): > self.dispatch.skip_steps("autopartitionexecute") > self.dispatch.skip_steps("cleardiskssel") > self.dispatch.request_steps("partition") > - self.dispatch.request_steps("bootloader") > + self.dispatch.request_steps_gently("bootloader") > > self.storage.config.clearPartType = CLEARPART_TYPE_NONE > else: > @@ -184,7 +184,9 @@ class PartitionTypeWindow(InstallWindow): > elif self.buttonGroup.getCurrent() == "freespace": > self.storage.config.clearPartType = CLEARPART_TYPE_NONE > > - self.dispatch.request_steps("autopartitionexecute", "cleardiskssel") > + self.dispatch.request_steps("autopartitionexecute") > + # cleardiskssel is skipped for upgrades: > + self.dispatch.request_steps_gently("cleardiskssel") > > if self.lvmButton.get_active(): > self.storage.lvmAutoPart = True > diff --git a/pyanaconda/upgrade.py b/pyanaconda/upgrade.py > index bc5f977..d18d1b6 100644 > --- a/pyanaconda/upgrade.py > +++ b/pyanaconda/upgrade.py > @@ -102,7 +102,7 @@ def findRootParts(anaconda): > setUpgradeRoot(anaconda) > > if anaconda.rootParts is not None and len(anaconda.rootParts) > 0: > - anaconda.dispatch.request_steps("findinstall") > + anaconda.dispatch.request_steps_gently("findinstall") > else: > anaconda.dispatch.skip_steps("findinstall") > > @@ -258,14 +258,19 @@ def upgradeMountFilesystems(anaconda): > > def setSteps(anaconda): > dispatch = anaconda.dispatch > - dispatch.schedule_steps( > + # in case we are scheduling steps from the examine GUI, it is already too > + # late for some of them: > + dispatch.schedule_steps_gently( > "language", > "keyboard", > "filtertype", > "filter", > "storageinit", > "findrootparts", > - "findinstall", > + "findinstall" > + ) > + # schedule the rest: > + dispatch.schedule_steps( > "upgrademount", > "restoretime", > "upgrademigfind", -- Martin Gracik <mgracik@xxxxxxxxxx> _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list