[PATCH2] Make progress screen in text mode standalone spoke instead of hub

Samantha N. Bueno sbueno+anaconda at redhat.com
Tue Sep 17 20:14:54 UTC 2013


On Tue, Sep 17, 2013 at 05:13:02PM +0200, Vratislav Podzimek wrote:
> On Tue, 2013-09-17 at 09:41 -0400, Samantha N. Bueno wrote:
> > On Tue, Sep 17, 2013 at 11:38:49AM +0200, Vratislav Podzimek wrote:
> > > The progress screen in text mode is not a hub. It cannot provide any spokes
> > > because it prints a lot of text to the output and spokes would be rolled off in
> > > a moment. It should be a standalone spoke which also fixes the issue with it not
> > > being scheduled because of no spokes to be provided.
> > > 
> > > Resolves: rhbz#1008788
> > > 
> > > Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> > > ---
> > > <>
> > > diff --git a/pyanaconda/ui/tui/spokes/progress.py b/pyanaconda/ui/tui/spokes/progress.py
> > > new file mode 100644
> > > index 0000000..44adb43
> > > --- /dev/null
> > > +++ b/pyanaconda/ui/tui/spokes/progress.py
> > > @@ -0,0 +1,140 @@
> > > +# Text progress hub classes
> > > +#
> > > +# Copyright (C) 2012  Red Hat, Inc.
> > > +#
> > > +# This copyrighted material is made available to anyone wishing to use,
> > > +# modify, copy, or redistribute it subject to the terms and conditions of
> > > +# the GNU General Public License v.2, or (at your option) any later version.
> > > +# This program is distributed in the hope that it will be useful, but WITHOUT
> > > +# ANY WARRANTY expressed or implied, including the implied warranties of
> > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
> > > +# Public License for more details.  You should have received a copy of the
> > > +# GNU General Public License along with this program; if not, write to the
> > > +# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> > > +# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
> > > +# source code or documentation are not subject to the GNU General Public
> > > +# License and may only be used or replicated with the express permission of
> > > +# Red Hat, Inc.
> > > +#
> > > +# Red Hat Author(s): Jesse Keating <jkeating at redhat.com>
> > > +#
> > > +
> > > +import sys
> > > +
> > > +from pyanaconda.flags import flags
> > > +from pyanaconda.i18n import _
> > > +from pyanaconda.constants import THREAD_INSTALL, THREAD_CONFIGURATION
> > > +from pykickstart.constants import KS_SHUTDOWN, KS_REBOOT
> > > +
> > > +from pyanaconda.ui.tui.spokes import StandaloneTUISpoke
> > > +from pyanaconda.ui.tui.hubs.summary import SummaryHub
> > > +from pyanaconda.ui.tui.simpleline.base import ExitAllMainLoops
> > > +
> > > +__all__ = ["ProgressSpoke"]
> > > +
> > > +class ProgressSpoke(StandaloneTUISpoke):
> > > +    title = _("Progress")
> > > +
> > > +    postForHub = SummaryHub
> > Is this necessary? It wasn't in the original, so I'm curious why you've
> > added it now.
> You mean the postForHub attribute? I think that StandaloneSpokes should
> have preForHub or postForHub defined. It's used when sorting actions.

Yeah, that was what I meant. I see what you mean now, the preForHub and
postForHub is all detailed in pyanaconda.ui.common. This looks good to
me then.

Samantha


More information about the anaconda-patches mailing list