From 69d675f4aa14b4957d6376d642bec5cf4b96674e Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 12:29:57 -0400 Subject: Many more manual changes --- archinstall/lib/installer.py | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'archinstall/lib/installer.py') diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 68d058f0..ba92d519 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -1,15 +1,11 @@ -import os, stat, time, shutil, pathlib -import subprocess, logging -from .exceptions import * from .disk import * -from .general import * -from .user_interaction import * -from .profiles import Profile +from .hardware import * from .mirrors import * -from .systemd import Networkd from .output import log +from .profiles import Profile from .storage import storage -from .hardware import * +from .systemd import Networkd +from .user_interaction import * # Any package that the Installer() is responsible for (optional and the default ones) __packages__ = ["base", "base-devel", "linux-firmware", "linux", "linux-lts", "linux-zen", "linux-hardened"] @@ -47,7 +43,7 @@ class Installer(): 'base' : False, 'bootloader' : False } - + self.base_packages = base_packages.split(' ') if type(base_packages) is str else base_packages for kernel in kernels: self.base_packages.append(kernel) @@ -100,10 +96,10 @@ class Installer(): self.log('Some required steps were not successfully installed/configured before leaving the installer:', fg='red', level=logging.WARNING) for step in missing_steps: self.log(f' - {step}', fg='red', level=logging.WARNING) - + self.log(f"Detailed error logs can be found at: {storage['LOG_PATH']}", level=logging.WARNING) self.log(f"Submit this zip file as an issue to https://github.com/archlinux/archinstall/issues", level=logging.WARNING) - + self.sync_log_to_install_medium() return False @@ -116,7 +112,7 @@ class Installer(): if not os.path.isdir(f"{self.target}/{os.path.dirname(absolute_logfile)}"): os.makedirs(f"{self.target}/{os.path.dirname(absolute_logfile)}") - + shutil.copy2(absolute_logfile, f"{self.target}/{absolute_logfile}") return True @@ -124,7 +120,7 @@ class Installer(): def mount(self, partition, mountpoint, create_mountpoint=True): if create_mountpoint and not os.path.isdir(f'{self.target}{mountpoint}'): os.makedirs(f'{self.target}{mountpoint}') - + partition.mount(f'{self.target}{mountpoint}') def post_install_check(self, *args, **kwargs): @@ -147,7 +143,7 @@ class Installer(): def genfstab(self, flags='-pU'): self.log(f"Updating {self.target}/etc/fstab", level=logging.INFO) - + fstab = sys_command(f'/usr/bin/genfstab {flags} {self.target}').trace_log with open(f"{self.target}/etc/fstab", 'ab') as fstab_fh: fstab_fh.write(fstab) @@ -204,7 +200,7 @@ class Installer(): def arch_chroot(self, cmd, *args, **kwargs): if 'runas' in kwargs: cmd = f"su - {kwargs['runas']} -c \"{cmd}\"" - + return self.run_command(cmd) def drop_to_shell(self): @@ -224,7 +220,7 @@ class Installer(): network["DNS"] = dns conf = Networkd(Match={"Name": nic}, Network=network) - + with open(f"{self.target}/etc/systemd/network/10-{nic}.network", "a") as netconf: netconf.write(str(conf)) @@ -272,7 +268,7 @@ class Installer(): # Otherwise, we can go ahead and enable the services else: self.enable_service('systemd-networkd', 'systemd-resolved') - + return True @@ -281,7 +277,7 @@ class Installer(): return partition elif partition.parent not in partition.path and Partition(partition.parent, None, autodetect_filesystem=True).filesystem == 'crypto_LUKS': return Partition(partition.parent, None, autodetect_filesystem=True) - + return False def mkinitcpio(self, *flags): @@ -298,7 +294,7 @@ class Installer(): ## TODO: Perhaps this should be living in the function which dictates ## the partitioning. Leaving here for now. - + for partition in self.partitions: if partition.filesystem == 'btrfs': @@ -322,7 +318,7 @@ class Installer(): if not(hasUEFI()): self.base_packages.append('grub') - + if not isVM(): vendor = cpuVendor() if vendor == "AuthenticAMD": @@ -331,7 +327,7 @@ class Installer(): self.base_packages.append("intel-ucode") else: self.log("Unknown cpu vendor not installing ucode") - + self.pacstrap(self.base_packages) self.helper_flags['base-strapped'] = True @@ -395,7 +391,7 @@ class Installer(): f"default {self.init_time}", f"timeout 5" ] - + with open(f'{self.target}/boot/loader/loader.conf', 'w') as loader: for line in loader_data: if line[:8] == 'default ': @@ -500,7 +496,7 @@ class Installer(): o = b''.join(sys_command(f"/usr/bin/arch-chroot {self.target} sh -c \"echo '{user}:{password}' | chpasswd\"")) pass - + def user_set_shell(self, user, shell): self.log(f'Setting shell for {user} to {shell}', level=logging.INFO) -- cgit v1.2.3-54-g00ecf From b2d20647fc7d6dc6de9aa4e45a94e3765a10f028 Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 12:46:23 -0400 Subject: Some additional formatting --- .github/workflows/iso-build.yaml | 50 +++++++++++++++---------------- .github/workflows/lint-python.yaml | 2 +- .github/workflows/python-publish.yml | 32 ++++++++++---------- archinstall/__main__.py | 2 -- archinstall/lib/hardware.py | 58 +++++++++++++++++++++--------------- archinstall/lib/installer.py | 46 ++++++++++++++-------------- archinstall/lib/locale_helpers.py | 4 ++- 7 files changed, 102 insertions(+), 92 deletions(-) (limited to 'archinstall/lib/installer.py') diff --git a/.github/workflows/iso-build.yaml b/.github/workflows/iso-build.yaml index 6b89a50c..106bac4a 100644 --- a/.github/workflows/iso-build.yaml +++ b/.github/workflows/iso-build.yaml @@ -9,12 +9,12 @@ on: - main # In case we adopt this convention in the future pull_request: paths-ignore: - - 'docs/**' - - '**.editorconfig' - - '**.gitignore' - - '**.md' - - 'LICENSE' - - 'PKGBUILD' + - 'docs/**' + - '**.editorconfig' + - '**.gitignore' + - '**.md' + - 'LICENSE' + - 'PKGBUILD' jobs: build: @@ -23,22 +23,22 @@ jobs: image: archlinux:latest options: --privileged steps: - - uses: actions/checkout@v2 - - run: pwd - - run: find . - - run: cat /etc/os-release - - run: mkdir -p /tmp/archlive/airootfs/root/archinstall-git; cp -r . /tmp/archlive/airootfs/root/archinstall-git - - run: echo "pip uninstall archinstall -y; cd archinstall-git; python setup.py install" > /tmp/archlive/airootfs/root/.zprofile - - run: echo "echo \"This is an unofficial ISO for development and testing of archinstall. No support will be provided.\"" >> /tmp/archlive/airootfs/root/.zprofile - - run: echo "echo \"This ISO was built from Git SHA $GITHUB_SHA\"" >> /tmp/archlive/airootfs/root/.zprofile - - run: echo "echo \"Type archinstall to launch the installer.\"" >> /tmp/archlive/airootfs/root/.zprofile - - run: cat /tmp/archlive/airootfs/root/.zprofile - - run: pacman -Sy; pacman --noconfirm -S git archiso - - run: cp -r /usr/share/archiso/configs/releng/* /tmp/archlive - - run: echo -e "git\npython\npython-pip\npython-setuptools" >> /tmp/archlive/packages.x86_64 - - run: find /tmp/archlive - - run: cd /tmp/archlive; mkarchiso -v -w work/ -o out/ ./ - - uses: actions/upload-artifact@v2 - with: - name: Arch Live ISO - path: /tmp/archlive/out/*.iso + - uses: actions/checkout@v2 + - run: pwd + - run: find . + - run: cat /etc/os-release + - run: mkdir -p /tmp/archlive/airootfs/root/archinstall-git; cp -r . /tmp/archlive/airootfs/root/archinstall-git + - run: echo "pip uninstall archinstall -y; cd archinstall-git; python setup.py install" > /tmp/archlive/airootfs/root/.zprofile + - run: echo "echo \"This is an unofficial ISO for development and testing of archinstall. No support will be provided.\"" >> /tmp/archlive/airootfs/root/.zprofile + - run: echo "echo \"This ISO was built from Git SHA $GITHUB_SHA\"" >> /tmp/archlive/airootfs/root/.zprofile + - run: echo "echo \"Type archinstall to launch the installer.\"" >> /tmp/archlive/airootfs/root/.zprofile + - run: cat /tmp/archlive/airootfs/root/.zprofile + - run: pacman -Sy; pacman --noconfirm -S git archiso + - run: cp -r /usr/share/archiso/configs/releng/* /tmp/archlive + - run: echo -e "git\npython\npython-pip\npython-setuptools" >> /tmp/archlive/packages.x86_64 + - run: find /tmp/archlive + - run: cd /tmp/archlive; mkarchiso -v -w work/ -o out/ ./ + - uses: actions/upload-artifact@v2 + with: + name: Arch Live ISO + path: /tmp/archlive/out/*.iso diff --git a/.github/workflows/lint-python.yaml b/.github/workflows/lint-python.yaml index ab96b5cd..6e6ab071 100644 --- a/.github/workflows/lint-python.yaml +++ b/.github/workflows/lint-python.yaml @@ -1,4 +1,4 @@ -on: [push, pull_request] +on: [ push, pull_request ] name: Lint Python and Find Syntax Errors jobs: mypy: diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 489077b7..65f7d4e8 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -5,7 +5,7 @@ name: Upload archinstall to PyPi on: release: - types: [created, published] + types: [ created, published ] jobs: deploy: @@ -13,18 +13,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel flit - - name: Build and publish - env: - FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }} - FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - flit publish + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel flit + - name: Build and publish + env: + FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }} + FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + flit publish diff --git a/archinstall/__main__.py b/archinstall/__main__.py index 86ed0108..c8a4779b 100644 --- a/archinstall/__main__.py +++ b/archinstall/__main__.py @@ -1,6 +1,4 @@ import archinstall -import sys -import os if __name__ == '__main__': archinstall.run_as_a_module() diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index e4f87a0c..9eaff22e 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -7,17 +7,17 @@ from .general import sys_command from .networking import list_interfaces, enrich_iface_types __packages__ = [ - "mesa", - "xf86-video-amdgpu", - "xf86-video-ati", - "xf86-video-nouveau", - "xf86-video-vmware", - "libva-mesa-driver", - "libva-intel-driver", - "intel-media-driver", - "vulkan-radeon", - "vulkan-intel", - "nvidia", + "mesa", + "xf86-video-amdgpu", + "xf86-video-ati", + "xf86-video-nouveau", + "xf86-video-vmware", + "libva-mesa-driver", + "libva-intel-driver", + "intel-media-driver", + "vulkan-radeon", + "vulkan-intel", + "nvidia", ] AVAILABLE_GFX_DRIVERS = { @@ -55,47 +55,57 @@ AVAILABLE_GFX_DRIVERS = { "VMware / VirtualBox (open-source)": ["mesa", "xf86-video-vmware"], } -def hasWifi()->bool: + +def hasWifi() -> bool: return 'WIRELESS' in enrich_iface_types(list_interfaces().values()).values() -def hasAMDCPU()->bool: + +def hasAMDCPU() -> bool: if subprocess.check_output("lscpu | grep AMD", shell=True).strip().decode(): return True return False -def hasIntelCPU()->bool: + + +def hasIntelCPU() -> bool: if subprocess.check_output("lscpu | grep Intel", shell=True).strip().decode(): return True return False -def hasUEFI()->bool: + +def hasUEFI() -> bool: return os.path.isdir('/sys/firmware/efi') -def graphicsDevices()->dict: + +def graphicsDevices() -> dict: cards = {} for line in sys_command(f"lspci"): if b' VGA ' in line: - _, identifier = line.split(b': ',1) + _, identifier = line.split(b': ', 1) cards[identifier.strip().lower().decode('UTF-8')] = line return cards -def hasNvidiaGraphics()->bool: + +def hasNvidiaGraphics() -> bool: return any('nvidia' in x for x in graphicsDevices()) -def hasAmdGraphics()->bool: + +def hasAmdGraphics() -> bool: return any('amd' in x for x in graphicsDevices()) -def hasIntelGraphics()->bool: + +def hasIntelGraphics() -> bool: return any('intel' in x for x in graphicsDevices()) -def cpuVendor()-> Optional[str]: +def cpuVendor() -> Optional[str]: cpu_info = json.loads(subprocess.check_output("lscpu -J", shell=True).decode('utf-8'))['lscpu'] for info in cpu_info: - if info.get('field',None): - if info.get('field',None) == "Vendor ID:": - return info.get('data',None) + if info.get('field', None): + if info.get('field', None) == "Vendor ID:": + return info.get('data', None) return None + def isVM() -> bool: try: subprocess.check_call(["systemd-detect-virt"]) # systemd-detect-virt issues a non-zero exit code if it is not on a virtual machine diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index ba92d519..355afaa6 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -1,8 +1,6 @@ from .disk import * from .hardware import * from .mirrors import * -from .output import log -from .profiles import Profile from .storage import storage from .systemd import Networkd from .user_interaction import * @@ -10,6 +8,7 @@ from .user_interaction import * # Any package that the Installer() is responsible for (optional and the default ones) __packages__ = ["base", "base-devel", "linux-firmware", "linux", "linux-lts", "linux-zen", "linux-hardened"] + class Installer(): """ `Installer()` is the wrapper for most basic installation steps. @@ -34,14 +33,15 @@ class Installer(): :type hostname: str, optional """ + def __init__(self, target, *, base_packages=__packages__[:3], kernels=['linux']): self.target = target self.init_time = time.strftime('%Y-%m-%d_%H-%M-%S') self.milliseconds = int(str(time.time()).split('.')[1]) self.helper_flags = { - 'base' : False, - 'bootloader' : False + 'base': False, + 'bootloader': False } self.base_packages = base_packages.split(' ') if type(base_packages) is str else base_packages @@ -74,7 +74,7 @@ class Installer(): # TODO: https://stackoverflow.com/questions/28157929/how-to-safely-handle-an-exception-inside-a-context-manager if len(args) >= 2 and args[1]: - #self.log(self.trace_log.decode('UTF-8'), level=logging.DEBUG) + # self.log(self.trace_log.decode('UTF-8'), level=logging.DEBUG) self.log(args[1], level=logging.ERROR, fg='red') self.sync_log_to_install_medium() @@ -169,10 +169,10 @@ class Installer(): def set_timezone(self, zone, *args, **kwargs): if not zone: return True - if not len(zone): return True # Redundant + if not len(zone): return True # Redundant - if (pathlib.Path("/usr")/"share"/"zoneinfo"/zone).exists(): - (pathlib.Path(self.target)/"etc"/"localtime").unlink(missing_ok=True) + if (pathlib.Path("/usr") / "share" / "zoneinfo" / zone).exists(): + (pathlib.Path(self.target) / "etc" / "localtime").unlink(missing_ok=True) sys_command(f'/usr/bin/arch-chroot {self.target} ln -s /usr/share/zoneinfo/{zone} /etc/localtime') return True else: @@ -235,6 +235,7 @@ class Installer(): # If we haven't installed the base yet (function called pre-maturely) if self.helper_flags.get('base', False) is False: self.base_packages.append('iwd') + # This function will be called after minimal_installation() # as a hook for post-installs. This hook is only needed if # base is not installed yet. @@ -264,18 +265,19 @@ class Installer(): if self.helper_flags.get('base', False) is False: def post_install_enable_networkd_resolved(*args, **kwargs): self.enable_service('systemd-networkd', 'systemd-resolved') + self.post_base_install.append(post_install_enable_networkd_resolved) # Otherwise, we can go ahead and enable the services else: self.enable_service('systemd-networkd', 'systemd-resolved') - return True def detect_encryption(self, partition): if partition.encrypted: return partition - elif partition.parent not in partition.path and Partition(partition.parent, None, autodetect_filesystem=True).filesystem == 'crypto_LUKS': + elif partition.parent not in partition.path and Partition(partition.parent, None, + autodetect_filesystem=True).filesystem == 'crypto_LUKS': return Partition(partition.parent, None, autodetect_filesystem=True) return False @@ -294,11 +296,9 @@ class Installer(): ## TODO: Perhaps this should be living in the function which dictates ## the partitioning. Leaving here for now. - - for partition in self.partitions: if partition.filesystem == 'btrfs': - #if partition.encrypted: + # if partition.encrypted: self.base_packages.append('btrfs-progs') if partition.filesystem == 'xfs': self.base_packages.append('xfsprogs') @@ -316,12 +316,12 @@ class Installer(): if 'encrypt' not in self.HOOKS: self.HOOKS.insert(self.HOOKS.index('filesystems'), 'encrypt') - if not(hasUEFI()): + if not (hasUEFI()): self.base_packages.append('grub') if not isVM(): vendor = cpuVendor() - if vendor == "AuthenticAMD": + if vendor == "AuthenticAMD": self.base_packages.append("amd-ucode") elif vendor == "GenuineIntel": self.base_packages.append("intel-ucode") @@ -337,9 +337,9 @@ class Installer(): ) # Redundant \n at the start? who knows? ## TODO: Support locale and timezone - #os.remove(f'{self.target}/etc/localtime') - #sys_command(f'/usr/bin/arch-chroot {self.target} ln -s /usr/share/zoneinfo/{localtime} /etc/localtime') - #sys_command('/usr/bin/arch-chroot /mnt hwclock --hctosys --localtime') + # os.remove(f'{self.target}/etc/localtime') + # sys_command(f'/usr/bin/arch-chroot {self.target} ln -s /usr/share/zoneinfo/{localtime} /etc/localtime') + # sys_command('/usr/bin/arch-chroot /mnt hwclock --hctosys --localtime') self.set_hostname('archinstall') self.set_locale('en_US') @@ -361,7 +361,7 @@ class Installer(): boot_partition = None root_partition = None for partition in self.partitions: - if partition.mountpoint == self.target+'/boot': + if partition.mountpoint == self.target + '/boot': boot_partition = partition elif partition.mountpoint == self.target: root_partition = partition @@ -404,7 +404,7 @@ class Installer(): ## For some reason, blkid and /dev/disk/by-uuid are not getting along well. ## And blkid is wrong in terms of LUKS. - #UUID = sys_command('blkid -s PARTUUID -o value {drive}{partition_2}'.format(**args)).decode('UTF-8').strip() + # UUID = sys_command('blkid -s PARTUUID -o value {drive}{partition_2}'.format(**args)).decode('UTF-8').strip() # Setup the loader entry with open(f'{self.target}/boot/loader/entries/{self.init_time}.conf', 'w') as entry: entry.write(f'# Created by: archinstall\n') @@ -413,7 +413,7 @@ class Installer(): entry.write(f'linux /vmlinuz-linux\n') if not isVM(): vendor = cpuVendor() - if vendor == "AuthenticAMD": + if vendor == "AuthenticAMD": entry.write("initrd /amd-ucode.img\n") elif vendor == "GenuineIntel": entry.write("initrd /intel-ucode.img\n") @@ -468,13 +468,13 @@ class Installer(): self.log(f'Installing network profile {profile}', level=logging.INFO) return profile.install() - def enable_sudo(self, entity :str, group=False): + def enable_sudo(self, entity: str, group=False): self.log(f'Enabling sudo permissions for {entity}.', level=logging.INFO) with open(f'{self.target}/etc/sudoers', 'a') as sudoers: sudoers.write(f'{"%" if group else ""}{entity} ALL=(ALL) ALL\n') return True - def user_create(self, user :str, password=None, groups=[], sudo=False): + def user_create(self, user: str, password=None, groups=[], sudo=False): self.log(f'Creating user {user}', level=logging.INFO) o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.target} useradd -m -G wheel {user}')) if password: diff --git a/archinstall/lib/locale_helpers.py b/archinstall/lib/locale_helpers.py index daf67e5b..addc8da1 100644 --- a/archinstall/lib/locale_helpers.py +++ b/archinstall/lib/locale_helpers.py @@ -1,7 +1,9 @@ -import subprocess import os +import subprocess from .exceptions import * + + # from .general import sys_command -- cgit v1.2.3-54-g00ecf From 67b4d5d551d1e2d1e8937cc443bc58d68a439782 Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 13:14:45 -0400 Subject: fix installer.py inconsistent tabs/spaces error --- archinstall/lib/installer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'archinstall/lib/installer.py') diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 355afaa6..15bdf62e 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -15,18 +15,18 @@ class Installer(): It also wraps :py:func:`~archinstall.Installer.pacstrap` among other things. :param partition: Requires a partition as the first argument, this is - so that the installer can mount to `mountpoint` and strap packages there. + so that the installer can mount to `mountpoint` and strap packages there. :type partition: class:`archinstall.Partition` :param boot_partition: There's two reasons for needing a boot partition argument, - The first being so that `mkinitcpio` can place the `vmlinuz` kernel at the right place - during the `pacstrap` or `linux` and the base packages for a minimal installation. - The second being when :py:func:`~archinstall.Installer.add_bootloader` is called, - A `boot_partition` must be known to the installer before this is called. + The first being so that `mkinitcpio` can place the `vmlinuz` kernel at the right place + during the `pacstrap` or `linux` and the base packages for a minimal installation. + The second being when :py:func:`~archinstall.Installer.add_bootloader` is called, + A `boot_partition` must be known to the installer before this is called. :type boot_partition: class:`archinstall.Partition` :param profile: A profile to install, this is optional and can be called later manually. - This just simplifies the process by not having to call :py:func:`~archinstall.Installer.install_profile` later on. + This just simplifies the process by not having to call :py:func:`~archinstall.Installer.install_profile` later on. :type profile: str, optional :param hostname: The given /etc/hostname for the machine. -- cgit v1.2.3-54-g00ecf From 45d8c1c33637fb55c338e7fb19a1f05012fb1d3a Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 13:33:30 -0400 Subject: Fix partition -> part suggestion by Torxed --- archinstall/lib/installer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'archinstall/lib/installer.py') diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 15bdf62e..f03492f7 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -274,11 +274,11 @@ class Installer(): return True def detect_encryption(self, partition): + part = Partition(partition.parent, None, autodetect_filesystem=True) if partition.encrypted: return partition - elif partition.parent not in partition.path and Partition(partition.parent, None, - autodetect_filesystem=True).filesystem == 'crypto_LUKS': - return Partition(partition.parent, None, autodetect_filesystem=True) + elif partition.parent not in partition.path and part.filesystem == 'crypto_LUKS': + return part return False -- cgit v1.2.3-54-g00ecf From a475852d7a5d4a08ab1679ff49a7270f7b5f5bea Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 13:37:08 -0400 Subject: Remove unnecessary parenthesis --- archinstall/lib/installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall/lib/installer.py') diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index f03492f7..eccd2c49 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -316,7 +316,7 @@ class Installer(): if 'encrypt' not in self.HOOKS: self.HOOKS.insert(self.HOOKS.index('filesystems'), 'encrypt') - if not (hasUEFI()): + if not hasUEFI(): self.base_packages.append('grub') if not isVM(): -- cgit v1.2.3-54-g00ecf