PATCH: livecd backend skip rootfs format

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

 



Hi,

Here is a patch that does away with rootfs formatting
by the livecd backend, as formatting happens again
when the live image is transferred.  Only the most
rudimentary of testing has been performed.

Please review.  Comments and suggestions for improvements
are very welcome.  See bug 248085 for reference.

-dmc
diff -Naur anaconda.cvs.20070713/backend.py anaconda/backend.py
--- anaconda.cvs.20070713/backend.py	2007-06-26 18:58:55.000000000 +0000
+++ anaconda/backend.py	2007-07-13 09:48:53.000000000 +0000
@@ -44,6 +44,9 @@
         self.supportsUpgrades = True
         self.supportsPackageSelection = False
 
+        # some backends may have a special case for rootfs formatting
+        self.skipFormatRoot = False
+
     def doPreSelection(self, intf, id, instPath):
         pass
 
diff -Naur anaconda.cvs.20070713/fsset.py anaconda/fsset.py
--- anaconda.cvs.20070713/fsset.py	2007-07-02 19:05:21.000000000 +0000
+++ anaconda/fsset.py	2007-07-13 10:14:30.000000000 +0000
@@ -1618,7 +1618,7 @@
         self.volumesCreated = 1
 
 
-    def makeFilesystems (self, chroot='/'):
+    def makeFilesystems (self, chroot='/', skiprootfs=False):
         formatted = []
         notformatted = []
         for entry in self.entries:
@@ -1626,6 +1626,9 @@
                 or entry.isMounted()):
                 notformatted.append(entry)
                 continue
+            if (skiprootfs and entry.mountpoint == '/'):
+                formatted.append(entry)
+                continue
             try:
                 self.formatEntry(entry, chroot)
                 formatted.append(entry)
@@ -1698,7 +1701,7 @@
 	for entry in self.entries:
             # Don't try to mount a protected partition, since it will already
             # have been mounted as the installation source.
-            if not entry.fsystem.isMountable() or (protected and entry.device.getDevice() in protected):
+            if not entry.fsystem.isMountable() or (protected and entry.device.getDevice() in protected) or (anaconda.backend.skipFormatRoot and entry.mountpoint == '/'):
 		continue
 
             try:
diff -Naur anaconda.cvs.20070713/livecd.py anaconda/livecd.py
--- anaconda.cvs.20070713/livecd.py	2007-07-02 19:05:21.000000000 +0000
+++ anaconda/livecd.py	2007-07-13 09:56:42.000000000 +0000
@@ -152,6 +152,7 @@
         backend.AnacondaBackend.__init__(self, method, instPath)
         self.supportsUpgrades = False
         self.supportsPackageSelection = False
+        self.skipFormatRoot = True
 
     def doPreInstall(self, anaconda):
         if anaconda.dir == DISPATCH_BACK:
diff -Naur anaconda.cvs.20070713/packages.py anaconda/packages.py
--- anaconda.cvs.20070713/packages.py	2007-07-09 15:44:28.000000000 +0000
+++ anaconda/packages.py	2007-07-13 09:56:01.000000000 +0000
@@ -150,7 +150,8 @@
                 anaconda.id.fsset.createLogicalVolumes(anaconda.rootPath)
             anaconda.id.fsset.formatSwap(anaconda.rootPath)
             anaconda.id.fsset.turnOnSwap(anaconda.rootPath)
-	    anaconda.id.fsset.makeFilesystems (anaconda.rootPath)
+            anaconda.id.fsset.makeFilesystems(anaconda.rootPath,
+                                              anaconda.backend.skipFormatRoot)
             anaconda.id.fsset.mountFilesystems (anaconda)
 
 def setupTimezone(anaconda):

[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