Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-10-30 13:51:39 +0200
committerAnton Hvornum <anton@hvornum.se>2021-10-30 13:51:39 +0200
commit5d124f810699580663b865009cc2c5f366acd9b9 (patch)
tree5e97b84fa4302b3e0b75bc65dc5f3a3bb2f9a3d8 /archinstall/lib/disk
parent05a8739231412ca1ce866e8f8b1636b3e7b94ebe (diff)
Added debugging to the btrfs functions.
Diffstat (limited to 'archinstall/lib/disk')
-rw-r--r--archinstall/lib/disk/btrfs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/archinstall/lib/disk/btrfs.py b/archinstall/lib/disk/btrfs.py
index e9ffec66..f26a18f5 100644
--- a/archinstall/lib/disk/btrfs.py
+++ b/archinstall/lib/disk/btrfs.py
@@ -3,6 +3,7 @@ from typing import Union
from .helpers import get_mount_info
from ..exceptions import DiskError
from ..general import SysCommand
+from ..output import log
def mount_subvolume(installation, location :Union[pathlib.Path, str], force=False) -> bool:
"""
@@ -22,6 +23,8 @@ def mount_subvolume(installation, location :Union[pathlib.Path, str], force=Fals
if glob.glob(str(installation.target/location/'*')) and force is False:
raise DiskError(f"Cannot mount subvolume to {installation.target/location} because it contains data (non-empty folder target)")
+ log(f"Mounting {location} as a subvolume", level=logging.INFO)
+ print(get_mount_info(installation.target/location))
# Mount the logical volume to the physical structure
mount_location = get_mount_info(installation.target/location)['source']
SysCommand(f"umount {mount_location}")
@@ -34,5 +37,5 @@ def create_subvolume(installation, location :Union[pathlib.Path, str]) -> bool:
@installation: archinstall.Installer instance
@location: a localized string or path inside the installation / or /boot for instance without specifying /mnt/boot
"""
-
+ log(f"Creating a subvolume on {installation.target}/{str(location)}", level=logging.INFO)
SysCommand(f"btrfs subvolume create {installation.target}/{str(location)}") \ No newline at end of file