Untested as of yet, but just seeing what people think of the general approach. Seems a little better than the old way we were handling it since we keep consistency. Ensure that with live installs that the type of the rootfs matches what we need it to. This used to be done behind the user's back in the livecd code, but it's probably better to handle more generally like this --- backend.py | 1 + livecd.py | 1 + storage/__init__.py | 9 +++++++++ 3 files changed, 11 insertions(+), 0 deletions(-) diff --git a/backend.py b/backend.py index 680f058..729966a 100644 --- a/backend.py +++ b/backend.py @@ -54,6 +54,7 @@ class AnacondaBackend: # some backends may have a special case for rootfs formatting # FIXME: we should handle this a little more elegantly self.skipFormatRoot = False + self.rootFsType = None self._loopbackFile = None diff --git a/livecd.py b/livecd.py index 391b1ce..a2b9ece 100644 --- a/livecd.py +++ b/livecd.py @@ -112,6 +112,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend): custom_icon="error", custom_buttons=[_("Exit installer")]) sys.exit(0) + self.rootfsType = isys.readFSType(osimg) def _getLiveBlockDevice(self): return os.path.normpath(self.osimg) diff --git a/storage/__init__.py b/storage/__init__.py index 7c17ec8..b0a5203 100644 --- a/storage/__init__.py +++ b/storage/__init__.py @@ -765,6 +765,15 @@ class Storage(object): %(self.anaconda.backend.getMinimumSizeMB("/"), productName)) + # livecds have to have the rootfs type match up + if (root and + self.anaconda.backend.rootFsType and + root.format.type != self.anaconda.backend.rootFsType): + errors.append(_("Your / partition does not match the " + "filesystem of the live image you are " + "installing from. The format must be %s") + % (self.anaconda.backend.rootFsType,)) + for (mount, size) in checkSizes: if mount in filesystems and filesystems[mount].size < size: warnings.append(_("Your %s partition is less than %s " -- 1.6.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list