Skip to content

Commit

Permalink
Allow reusing existing "empty" filesystems for /
Browse files Browse the repository at this point in the history
We currently require that filesystem for / must be newly formatted
by Anaconda, with the new storage workflow the filesystems created
in Cockpit doesn't need to be reformatted so the check needs to
be adjusted to check if the filesystem selected for / is empty and
force the reformatting only when it contains some preexisting data.
  • Loading branch information
vojtechtrefny committed Jan 22, 2024
1 parent a48d88a commit 8d4843f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyanaconda/modules/storage/checker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def verify_root(storage, constraints, report_error, report_warning):
"which is required for installation of %s"
" to continue.") % (get_product_name(),))

if root and root.format.exists and root.format.mountable and root.format.mountpoint == "/":
if root and root.format.exists and root.format.mountable and root.format.mountpoint == "/" \
and not root.format.is_empty:
report_error(_("You must create a new file system on the root device."))

if storage.root_device and constraints[STORAGE_ROOT_DEVICE_TYPES]:
Expand Down

0 comments on commit 8d4843f

Please sign in to comment.