[PATCH] tell liveinst users about mandatory rootfs format

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

 



Douglas McClendon wrote:
I mentioned on fedora-devel that I might try to put together (today) a patch to fix 250301. I said this because I know jkatz is out for the week, and it seems like this would be a _really_ nice thing to fix for f8t1.

I'm still not 100% positive that this bug still exists in the latest/rawhide anaconda, as I'm not currently set up with a rawhide dev env.

However, I went ahead and created a better stopgap fix against cvs anaconda, and tested it against the f7-livecd under qemu, and it appears to work.

I don't know if this is worth putting into f8t1 at this late a time, but formatting someone's requested / partition, when they requested it not be formatted, seems pretty bad.

FWIW- attached is something that might fix the problem for the timebeing.

-dmc


diff -Naur anaconda.cvs.20070801/iw/lvm_dialog_gui.py anaconda/iw/lvm_dialog_gui.py
--- anaconda.cvs.20070801/iw/lvm_dialog_gui.py	2007-02-27 21:17:26.000000000 +0000
+++ anaconda/iw/lvm_dialog_gui.py	2007-08-01 10:42:28.000000000 +0000
@@ -651,6 +651,9 @@
 		request.mountpoint and request.formatByDefault()):
 		if not queryNoFormatPreExisting(self.intf):
 		    continue
+                if (request.mountpoint == "/") and os.environ.has_key("LIVE_BLOCK"):
+                    mustFormatRoot(self.intf)
+                    continue
 
 	    # see if there is room for request
 	    (availSpaceMB, neededSpaceMB, fspace) = self.computeSpaceValues(usepe=pesize)
diff -Naur anaconda.cvs.20070801/iw/partition_dialog_gui.py anaconda/iw/partition_dialog_gui.py
--- anaconda.cvs.20070801/iw/partition_dialog_gui.py	2007-03-16 16:06:44.000000000 +0000
+++ anaconda/iw/partition_dialog_gui.py	2007-08-01 10:43:31.000000000 +0000
@@ -244,6 +244,9 @@
                     request.mountpoint and request.formatByDefault()):
                     if not queryNoFormatPreExisting(self.intf):
                         continue
+                    if (request.mountpoint == "/") and os.environ.has_key("LIVE_BLOCK"):
+                        mustFormatRoot(self.intf)
+                        continue
 		    
 	    # everything ok, fall out of loop
 	    break
diff -Naur anaconda.cvs.20070801/iw/raid_dialog_gui.py anaconda/iw/raid_dialog_gui.py
--- anaconda.cvs.20070801/iw/raid_dialog_gui.py	2007-03-16 16:06:44.000000000 +0000
+++ anaconda/iw/raid_dialog_gui.py	2007-08-01 10:42:22.000000000 +0000
@@ -212,6 +212,9 @@
 		request.mountpoint and request.formatByDefault()):
 		if not queryNoFormatPreExisting(self.intf):
 		    continue
+                if (request.mountpoint == "/") and os.environ.has_key("LIVE_BLOCK"):
+                    mustFormatRoot(self.intf)
+                    continue
 
 	    # everything ok, break out
 	    break
diff -Naur anaconda.cvs.20070801/liveinst/liveinst.sh anaconda/liveinst/liveinst.sh
--- anaconda.cvs.20070801/liveinst/liveinst.sh	2007-04-04 18:05:42.000000000 +0000
+++ anaconda/liveinst/liveinst.sh	2007-08-01 11:05:50.000000000 +0000
@@ -4,7 +4,7 @@
 #
 
 if [ -z "$LIVE_BLOCK" ]; then
-    LIVE_BLOCK="/dev/live-osimg"
+    export LIVE_BLOCK="/dev/live-osimg"
 fi
 
 if [ ! -b $LIVE_BLOCK ]; then
diff -Naur anaconda.cvs.20070801/partIntfHelpers.py anaconda/partIntfHelpers.py
--- anaconda.cvs.20070801/partIntfHelpers.py	2007-07-06 19:53:27.000000000 +0000
+++ anaconda/partIntfHelpers.py	2007-08-01 08:57:15.000000000 +0000
@@ -418,6 +418,17 @@
     rc = intf.messageWindow(_("Format?"), txt, type = "custom", custom_buttons=[_("_Modify Partition"), _("Do _Not Format")], custom_icon="warning")
     return rc
 
+def mustFormatRoot(intf):
+    """Notify the user that leaving / unformatted is not yet possible."""
+    txt = _("You have chosen to use a pre-existing root (i.e. '/') "
+            "partition for this installation without formatting it. "
+            "The LiveCD/LiveUSB installer is not yet able to do this."
+            "If you really need to do this, please use the traditional"
+            "(non-Live) installation media.  Otherwise, please go back"
+            "and select the format option for the root volume")
+    rc = intf.messageWindow(_("Live Installer Must Format Root"), txt)
+    return rc
+
 def partitionSanityErrors(intf, errors):
     """Errors were found sanity checking.  Tell the user they must fix."""
     rc = 1
diff -Naur anaconda.cvs.20070801/textw/partition_text.py anaconda/textw/partition_text.py
--- anaconda.cvs.20070801/textw/partition_text.py	2007-05-02 21:37:04.000000000 +0000
+++ anaconda/textw/partition_text.py	2007-08-01 10:41:20.000000000 +0000
@@ -949,6 +949,9 @@
                     and request.formatByDefault()):
                     if not queryNoFormatPreExisting(self.intf):
                         continue
+                    if (request.mountpoint == "/") and os.environ.has_key("LIVE_BLOCK"):
+                        mustFormatRoot(self.intf)
+                        continue
 
             if not isNew:
                 self.partitions.removeRequest(origrequest)

[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