Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   Remove rootPath mode. (http://www.linux-archive.org/ubuntu-user/289631-remove-rootpath-mode.html)

Chris Lumens 12-02-2009 08:30 PM

Remove rootPath mode.
 
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

Ales Kozumplik 12-03-2009 10:00 AM

Remove rootPath mode.
 
On 12/02/2009 10:30 PM, Chris Lumens wrote:

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.
---


Ack for the code changes.

On the functional level: what if someone somewhere is using it and will
scream when the release doesn't support it?


Ales

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

Chris Lumens 12-03-2009 01:10 PM

Remove rootPath mode.
 
> On the functional level: what if someone somewhere is using it and
> will scream when the release doesn't support it?

Yes, someone will probably be unhappy with these changes. I'm torn on
whether these should go in RHEL6 or not. On the one hand, people could
be relying on them. On the other hand, they really don't work. We also
have alternatives.

Virt seems to have basically replaced --test, and in fact does a better
job because you'll be testing the exact same code path.

mock has largely taken over for --rootPath, at least for package
installation. It can't do all the things that anaconda does as far as
customization, though.

- Chris

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

Jeremy Katz 12-03-2009 02:30 PM

Remove rootPath mode.
 
On Thu, Dec 3, 2009 at 9:10 AM, Chris Lumens <clumens@redhat.com> wrote:
>> On the functional level: what if someone somewhere is using it and
>> will scream when the release doesn't support it?
>
> Yes, someone will probably be unhappy with these changes. *I'm torn on
> whether these should go in RHEL6 or not. *On the one hand, people could
> be relying on them. *On the other hand, they really don't work. *We also
> have alternatives.

I actually am less concerned about people relying on them at this
point; they used to get some occasional requests/reports, but nothing
in many years

> Virt seems to have basically replaced --test, and in fact does a better
> job because you'll be testing the exact same code path.

Mostly, yes. There are still cases it's faster/easier to just test
out how a screen looks with --test, but I suspect the arcane
incantations to make that work are largely unknown and not understood
now so I won't cry too much I guess

> mock has largely taken over for --rootPath, at least for package
> installation. *It can't do all the things that anaconda does as far as
> customization, though.

livecd-creator can deal with most of it, though. --rootPath was
really most useful for attaching a debugger to the package
installation path in times long gone past

- Jeremy

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


All times are GMT. The time now is 09:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.