Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions archinstall/lib/models/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ def parse_arg(
return config

def has_default_btrfs_vols(self) -> bool:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name was intended to indicate that we're looking for the default disk config as well so it doesn't make much sense anymore now no?

@codefiles codefiles Jan 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not but it is still checking for something that relates to the default disk config (a root Btrfs subvolume with the name Path('@')), right? What do you suggest?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah not sure what a better name might be, I suppose if someone uses the default layout in the manual partitioning it would also be valid. Let's just leave it for now

if self.config_type == DiskLayoutType.Default:
for mod in self.device_modifications:
for part in mod.partitions:
if part.is_create_or_modify():
if part.fs_type == FilesystemType.Btrfs:
if len(part.btrfs_subvols) > 0:
return True
for mod in self.device_modifications:
for part in mod.partitions:
if not (part.is_create_or_modify() and part.fs_type == FilesystemType.Btrfs):
continue

if any(subvol.is_default_root() for subvol in part.btrfs_subvols):
return True

return False

Expand Down Expand Up @@ -668,6 +668,9 @@ def is_root(self) -> bool:
return self.mountpoint == Path('/')
return False

def is_default_root(self) -> bool:
return self.name == Path('@') and self.is_root()

def json(self) -> _SubvolumeModificationSerialization:
return {'name': str(self.name), 'mountpoint': str(self.mountpoint)}

Expand Down