[PATCH 1/4] Remove rootPath mode.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This mode is decaying as anaconda moves forward with things like udev, dbus
etc.  No one is really working on making sure they continue to work.  Let's
stop pretending and also get rid of some additional complicated ways to
run anaconda.
---
 anaconda      |   28 +++-------------------------
 flags.py      |    1 -
 gui.py        |   18 ++++++------------
 packages.py   |   10 +++-------
 yuminstall.py |    1 -
 5 files changed, 12 insertions(+), 46 deletions(-)

diff --git a/anaconda b/anaconda
index 55eaf8d..d4c004a 100755
--- a/anaconda
+++ b/anaconda
@@ -167,11 +167,6 @@ def parseOptions():
     def resolution_cb (option, opt_str, value, parser):
         parser.values.runres = value
 
-    def rootpath_cb (option, opt_str, value, parser):
-        parser.values.rootPath = os.path.abspath(value)
-        flags.setupFilesystems = False
-        flags.rootpath = True
-
     op = OptionParser()
     # Interface
     op.add_option("-C", "--cmdline", dest="display_mode", action="store_const", const="c")
@@ -189,8 +184,6 @@ def parseOptions():
     op.add_option("-d", "--debug", dest="debug", action="store_true", default=False)
     op.add_option("--kickstart", dest="ksfile")
     op.add_option("--rescue", dest="rescue", action="store_true", default=False)
-    op.add_option("-r", "--rootpath", action="callback", callback=rootpath_cb, dest="rootPath",
-                  default="/mnt/sysimage", nargs=1, type="string")
     op.add_option("-t", "--test", action="store_true", default=False)
     op.add_option("--targetarch", dest="targetArch", nargs=1, type="string")
 
@@ -456,7 +449,7 @@ class Anaconda:
         self.methodstr = None
         self.stage2 = None
         self.backend = None
-        self.rootPath = None
+        self.rootPath = "/mnt/sysimage"
         self.dispatch = None
         self.isKickstart = False
         self.rescue_mount = True
@@ -662,7 +655,6 @@ if __name__ == "__main__":
 
     setupLoggingFromOpts(opts)
 
-    anaconda.rootPath = opts.rootPath
     # Default is to prompt to mount the installed system.
     anaconda.rescue_mount = not opts.rescue_nomount
 
@@ -753,7 +745,7 @@ if __name__ == "__main__":
     if iutil.isS390():
         opts.isHeadless = True
 
-    if not flags.test and not flags.rootpath and not flags.livecdInstall:
+    if not flags.test and not flags.livecdInstall:
             isys.auditDaemon()
 
     # setup links required for all install types
@@ -888,7 +880,7 @@ if __name__ == "__main__":
     # now determine if we're going to run in GUI or TUI mode
     #
     # if no X server, we have to use text mode
-    if not (flags.test or flags.rootpath or x_already_set) and (not iutil.isS390() and not os.access("/usr/bin/Xorg", os.X_OK)):
+    if not (flags.test or x_already_set) 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)
@@ -1042,20 +1034,6 @@ if __name__ == "__main__":
         # are correctly formed and refer to actual devices.
         ksdata.execute()
 
-    # Skip the disk options in rootpath mode
-    if flags.rootpath:
-        anaconda.dispatch.skipStep("parttype", permanent = 1)
-        anaconda.dispatch.skipStep("autopartitionexecute", permanent = 1)
-        anaconda.dispatch.skipStep("partition", permanent = 1)
-        anaconda.dispatch.skipStep("storagedone", permanent = 1)
-        anaconda.dispatch.skipStep("bootloader", permanent = 1)
-        anaconda.dispatch.skipStep("bootloaderadvanced", permanent = 1)
-        anaconda.dispatch.skipStep("upgbootloader", permanent = 1)
-
-    if flags.rootpath:
-        anaconda.dispatch.skipStep("bootloadersetup", permanent = 1)
-        anaconda.dispatch.skipStep("instbootloader", permanent = 1)
-
     # set up the headless case
     if opts.isHeadless == 1:
         anaconda.id.setHeadless(opts.isHeadless)
diff --git a/flags.py b/flags.py
index 93472e3..1aabe8e 100644
--- a/flags.py
+++ b/flags.py
@@ -68,7 +68,6 @@ class Flags:
     def __init__(self):
 	self.__dict__['flags'] = {}
 	self.__dict__['flags']['test'] = 0
-	self.__dict__['flags']['rootpath'] = 0
 	self.__dict__['flags']['livecdInstall'] = 0
 	self.__dict__['flags']['ibft'] = 1
 	self.__dict__['flags']['iscsi'] = 0
diff --git a/gui.py b/gui.py
index 4e65362..4379bec 100755
--- a/gui.py
+++ b/gui.py
@@ -308,12 +308,10 @@ def titleBarMotionEventCB(widget, event, data):
         data["window"].move(int(newx), int(newy))
 
 def addFrame(dialog, title=None, showtitle = 1):
-    # We don't add a Frame in rootpath mode, as we almost certainly
-    # have a window manager
     contents = dialog.get_children()[0]
     dialog.remove(contents)
     frame = gtk.Frame()
-    if not flags.rootpath and runningMiniWm():
+    if runningMiniWm():
         frame.set_shadow_type(gtk.SHADOW_OUT)
     else:
         frame.set_shadow_type(gtk.SHADOW_NONE)
@@ -322,7 +320,7 @@ def addFrame(dialog, title=None, showtitle = 1):
         if title is None:
             title = dialog.get_title()
 
-        if title and not flags.rootpath and runningMiniWm():
+        if title and runningMiniWm():
             data = {}
             data["state"] = 0
             data["button"] = 0
@@ -444,7 +442,7 @@ def readImageFromFile(file, width = None, height = None, dither = None,
 
 class WaitWindow:
     def __init__(self, title, text, parent = None):
-        if flags.rootpath or not runningMiniWm():
+        if not runningMiniWm():
             self.window = gtk.Window()
             if parent:
                 self.window.set_transient_for(parent)
@@ -476,7 +474,7 @@ class WaitWindow:
 class ProgressWindow:
     def __init__(self, title, text, total, updpct = 0.05, updsecs=10,
                  parent = None, pulse = False):
-        if flags.rootpath or not runningMiniWm():
+        if not runningMiniWm():
             self.window = gtk.Window()
             if parent:
                 self.window.set_transient_for(parent)
@@ -1257,12 +1255,8 @@ class InstallControlWindow:
                                     custom_buttons=[_("_Exit"),
                                                     _("_Retry")])
                 if not win.getrc():
-                    if flags.rootpath:
-                        msg =  _("The installer will now exit.")
-                        buttons = [_("_Exit installer")]
-                    else:
-                        msg =  _("The system will now reboot.")
-                        buttons = [_("_Reboot")]
+                    msg =  _("The system will now reboot.")
+                    buttons = [_("_Reboot")]
 
                     MessageWindow(_("Exiting"),
                                   msg,
diff --git a/packages.py b/packages.py
index 87028a8..ba345aa 100644
--- a/packages.py
+++ b/packages.py
@@ -192,7 +192,7 @@ def setupTimezone(anaconda):
         return
 
     # dont do this in test mode!
-    if flags.test or flags.rootpath:
+    if flags.test:
 	return
     
     os.environ["TZ"] = anaconda.id.timezone.tz
@@ -363,12 +363,8 @@ def betaNagScreen(anaconda):
 				   custom_buttons=[_("_Exit"), _("_Install anyway")])
 
 	if not rc:
-            if flags.rootpath:
-                msg =  _("The installer will now exit...")
-                buttons = [_("_Back"), _("_Exit")]
-            else:
-                msg =  _("Your system will now be rebooted...")
-                buttons = [_("_Back"), _("_Reboot")]
+            msg =  _("Your system will now be rebooted...")
+            buttons = [_("_Back"), _("_Reboot")]
 	    rc = anaconda.intf.messageWindow( _("Warning! This is pre-release software!"),
                                      msg,
                                      type="custom", custom_icon="warning",
diff --git a/yuminstall.py b/yuminstall.py
index accf452..2ffeba9 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1557,7 +1557,6 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
         # write out the fstab
         if not upgrade:
             anaconda.id.storage.fsset.write(anaconda.rootPath)
-            # rootpath mode doesn't have this file around
             if os.access("/etc/modprobe.d/anaconda.conf", os.R_OK):
                 shutil.copyfile("/etc/modprobe.d/anaconda.conf", 
                                 anaconda.rootPath + "/etc/modprobe.d/anaconda.conf")
-- 
1.6.5.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux