[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
PATCH: livecd backend skip rootfs format
- From: Douglas McClendon <dmc fedora filteredperception org>
- To: anaconda-devel-list redhat com
- Subject: PATCH: livecd backend skip rootfs format
- Date: Fri, 13 Jul 2007 05:36:24 -0500
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):
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]