Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorHimadri Bhattacharjee <lavafroth@protonmail.com>2023-09-16 23:21:08 +0000
committerGitHub <noreply@github.com>2023-09-17 09:21:08 +1000
commitf4a6d11373c61f77236f95b2a97f505c6eab55a2 (patch)
tree46bb3e6edd56a8bbfc88c18be707707195e6f23c /archinstall/lib
parent47ed711743f66fd4cabeb270952405674ef985ba (diff)
fix: make nodatacow and compress mutually exclusive (#1998)
* fix: make nodatacow and compress mutually exclusive * fix: raise ValueError when both compress and nodatacow flags are set
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk/device_model.py10
-rw-r--r--archinstall/lib/disk/subvolume_menu.py1
2 files changed, 8 insertions, 3 deletions
diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
index 28ee3116..6eeb0d91 100644
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -412,12 +412,18 @@ class SubvolumeModification:
mountpoint = Path(entry['mountpoint']) if entry['mountpoint'] else None
+ compress = entry.get('compress', False)
+ nodatacow = entry.get('nodatacow', False)
+
+ if compress and nodatacow:
+ raise ValueError('compress and nodatacow flags cannot be enabled simultaneously on a btfrs subvolume')
+
mods.append(
SubvolumeModification(
entry['name'],
mountpoint,
- entry.get('compress', False),
- entry.get('nodatacow', False)
+ compress,
+ nodatacow
)
)
diff --git a/archinstall/lib/disk/subvolume_menu.py b/archinstall/lib/disk/subvolume_menu.py
index 32a0e616..2b70d7b2 100644
--- a/archinstall/lib/disk/subvolume_menu.py
+++ b/archinstall/lib/disk/subvolume_menu.py
@@ -46,7 +46,6 @@ class SubvolumeMenu(ListManager):
['nodatacow', 'compress'],
skip=True,
preset_values=preset_options,
- multi=True
).run()
if choice.type_ == MenuSelectionType.Selection: