On Thu, 2012-04-26 at 19:52 -0400, Will Woods wrote: > The existing logic forces text-mode if /usr/bin/Xorg is missing. Except > it doesn't check if you're using VNC first, which caused problems on > certain POWER systems where we're not including Xorg anymore. > > We could just add 'and not flags.usevnc' to the if statement but it's > already really, *really* hard to understand what's going on there. > > So: this patch cleans up the logic in a way that should be equivalent, > *and* fixes the bug. > > A couple notes, if you're checking my work: > > - The flags.livecdInstall check was to avoid starting X during liveinst > (assuming it'd already be running on a live system), so the intent > there was: > flags.livecdInstall == flags.preexisting_x11 > > - The 'isS390' check in the first block was added in commit 4d42471, way > back in 2004: "enable GUI/VNC installs on mainframe again, there's no > Xorg binary". So the intent there was: > isS390 == (flags.preexisting_x11 or flags.usevnc) > > Knowing that, you can replace the conditions and do a little juggling > and come up with what I have here. Or something like it. > --- > anaconda | 35 ++++++++++++++++------------------- > 1 files changed, 16 insertions(+), 19 deletions(-) > > diff --git a/anaconda b/anaconda > index bf26013..b76af4d 100755 > --- a/anaconda > +++ b/anaconda > @@ -507,30 +507,27 @@ def setupDisplay(anaconda, opts): > log.info("Display mode = %s" % anaconda.displayMode) > check_memory(anaconda, opts) > > - # > - # now determine if we're going to run in GUI or TUI mode > - # > - # if no X server, we have to use text mode > - if anaconda.displayMode == 'g' and not flags.livecdInstall \ > - and not iutil.isS390() \ > - and not os.access("/usr/bin/Xorg", os.X_OK): > - stdoutLog.warning(_("Graphical installation is not available. " > - "Starting text mode.")) > - time.sleep(2) > - anaconda.displayMode = 't' > - > - # s390/iSeries checks > - if anaconda.isHeadless and anaconda.displayMode == "g" and not \ > - (flags.preexisting_x11 or flags.usevnc): > + # Should we try to start Xorg? > + want_x = anaconda.displayMode == 'g' and \ > + not (flags.preexisting_x11 or flags.usevnc) > + > + # X on a headless (e.g. s390) system? Nonsense! > + if want_x and anaconda.isHeadless: > stdoutLog.warning(_("DISPLAY variable not set. Starting text mode.")) > anaconda.displayMode = 't' > graphical_failed = 1 > time.sleep(2) > + want_x = False > + > + # Is Xorg is actually available? One "[iI]s" should be enough. ;) -- Vratislav Podzimek Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list