From 486ad7dd6d195dd435c5da58d241e14742f60485 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sat, 28 May 2022 15:40:36 +0200 Subject: Removes btrfs subvolume warnings on incorrect subvolume locations (#1267) * Adding debug information * Adding debug information * Adding debug information * Removed a 'already-a-subvolume' check as it requires more information. * Adding debug information * Adding debug information * Made sure Partition().subvolumes() only attempts to retrieve btrfs subvolume information if fstype==btrfs. * Removed debug information --- archinstall/lib/disk/btrfs/btrfspartition.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'archinstall/lib/disk/btrfs/btrfspartition.py') diff --git a/archinstall/lib/disk/btrfs/btrfspartition.py b/archinstall/lib/disk/btrfs/btrfspartition.py index 5020133d..299357b8 100644 --- a/archinstall/lib/disk/btrfs/btrfspartition.py +++ b/archinstall/lib/disk/btrfs/btrfspartition.py @@ -108,9 +108,13 @@ class BTRFSPartition(Partition): if glob.glob(str(subvolume / '*')): raise DiskError(f"Cannot create subvolume at {subvolume} because it contains data (non-empty folder target is not supported by BTRFS)") - elif subvolinfo := subvolume_info_from_path(subvolume): - raise DiskError(f"Destination {subvolume} is already a subvolume: {subvolinfo}") + # Ideally we would like to check if the destination is already a subvolume. + # But then we would need the mount-point at this stage as well. + # So we'll comment out this check: + # elif subvolinfo := subvolume_info_from_path(subvolume): + # raise DiskError(f"Destination {subvolume} is already a subvolume: {subvolinfo}") + # And deal with it here: SysCommand(f"btrfs subvolume create {subvolume}") return subvolume_info_from_path(subvolume) \ No newline at end of file -- cgit v1.2.3-54-g00ecf