Forgot some imports that didn't show up on a static run without going through a few of the menu's

This commit is contained in:
Anton Hvornum 2021-10-22 21:54:16 +02:00
parent 8b96080ec8
commit 7149b76f3b
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
7 changed files with 20 additions and 7 deletions

View File

@ -1,7 +1,7 @@
from .btrfs import *
from .helpers import *
from .blockdevice import BlockDevice
from .filesystem import Filesystem
from .filesystem import Filesystem, MBR, GPT
from .partition import *
from .user_guides import *
from .validators import *

View File

@ -1,3 +1,4 @@
import os
import json
import logging
from ..output import log
@ -94,6 +95,7 @@ class BlockDevice:
@property
def partitions(self):
from .filesystem import Partition
SysCommand(['partprobe', self.path])
result = SysCommand(['/usr/bin/lsblk', '-J', self.path])
@ -123,6 +125,7 @@ class BlockDevice:
@property
def partition_table_type(self):
from .filesystem import GPT
return GPT
@property

View File

@ -1,7 +1,11 @@
import time
import logging
import json
from .partition import Partition
from .blockdevice import BlockDevice
from ..general import SysCommand
from ..output import log
from ..storage import storage
GPT = 0b00000001
MBR = 0b00000010
@ -58,7 +62,7 @@ class Filesystem:
return index
def load_layout(self, layout :dict):
from .luks import luks2
from ..luks import luks2
# If the layout tells us to wipe the drive, we do so
if layout.get('wipe', False):

View File

@ -132,6 +132,8 @@ def get_mount_info(path) -> dict:
def get_partitions_in_use(mountpoint) -> list:
from .partition import Partition
try:
output = SysCommand(f"/usr/bin/findmnt --json -R {mountpoint}").decode('UTF-8')
except SysCallError:

View File

@ -2,9 +2,13 @@ import glob
import pathlib
import time
import logging
import json
import os
from typing import Optional
from .blockdevice import BlockDevice
from .helpers import get_mount_info, get_filesystem_type
from ..output import log
from ..general import SysCommand
class Partition:
def __init__(self, path: str, block_device: BlockDevice, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False, autodetect_filesystem=True):

View File

@ -3,7 +3,7 @@ from ..output import log
def suggest_single_disk_layout(block_device, default_filesystem=None):
if not default_filesystem:
from .user_interaction import ask_for_main_filesystem_format
from ..user_interaction import ask_for_main_filesystem_format
default_filesystem = ask_for_main_filesystem_format()
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
@ -76,7 +76,7 @@ def suggest_single_disk_layout(block_device, default_filesystem=None):
def suggest_multi_disk_layout(block_devices, default_filesystem=None):
if not default_filesystem:
from .user_interaction import ask_for_main_filesystem_format
from ..user_interaction import ask_for_main_filesystem_format
default_filesystem = ask_for_main_filesystem_format()
# Not really a rock solid foundation of information to stand on, but it's a start:

View File

@ -140,7 +140,7 @@ def ask_user_questions():
# Ask for a root password (optional, but triggers requirement for super-user if skipped)
if not archinstall.arguments.get('!root-password', None):
archinstall.arguments['!root-password'] = archinstall.get_password(prompt='Enter root password (Recommendation: leave blank to leave root disabled): ')
archinstall.arguments['!root-password'] = archinstall.get_password(prompt='Enter root password (leave blank to disable disabled & create superuser): ')
# Ask for additional users (super-user if root pw was not set)
@ -245,9 +245,9 @@ def perform_filesystem_operations():
Setup the blockdevice, filesystem (and optionally encryption).
Once that's done, we'll hand over to perform_installation()
"""
mode = archinstall.GPT
mode = archinstall.disk.GPT
if has_uefi() is False:
mode = archinstall.MBR
mode = archinstall.disk.MBR
for drive in archinstall.arguments['harddrives']:
with archinstall.Filesystem(drive, mode) as fs: