Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-11-18 13:34:07 +0000
committerGitHub <noreply@github.com>2021-11-18 13:34:07 +0000
commitd2a4572e98044d4af504aabd0203b6c89e9991bf (patch)
treef98a218de6eed851cfdbd7b6cd8157fdcf76a369 /profiles
parent776823adfb2d9ea140b9d849ee9a1dd07991a94c (diff)
Added a log message for when xorg fails a certain step. (#731)
* Added a log message for when xorg fails a certain step. * Fixed f-string issues. Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
Diffstat (limited to 'profiles')
-rw-r--r--profiles/xorg.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/profiles/xorg.py b/profiles/xorg.py
index b76227ed..699d9fcd 100644
--- a/profiles/xorg.py
+++ b/profiles/xorg.py
@@ -1,6 +1,7 @@
# A system with "xorg" installed
import archinstall
+import logging
is_top_level_profile = True
@@ -36,15 +37,16 @@ def _prep_function(*args, **kwargs):
# or through conventional import xorg
if __name__ == 'xorg':
try:
- if "nvidia" in archinstall.storage.get("gfx_driver_packages", None):
+ if "nvidia" in archinstall.storage.get("gfx_driver_packages", []):
if "linux-zen" in archinstall.storage['installation_session'].base_packages or "linux-lts" in archinstall.storage['installation_session'].base_packages:
for kernel in archinstall.storage['installation_session'].kernels:
archinstall.storage['installation_session'].add_additional_packages(f"{kernel}-headers") # Fixes https://github.com/archlinux/archinstall/issues/585
archinstall.storage['installation_session'].add_additional_packages("dkms") # I've had kernel regen fail if it wasn't installed before nvidia-dkms
archinstall.storage['installation_session'].add_additional_packages("xorg-server xorg-xinit nvidia-dkms")
else:
- archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(archinstall.storage.get('gfx_driver_packages', None))}")
+ archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(archinstall.storage.get('gfx_driver_packages', []))}")
else:
- archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(archinstall.storage.get('gfx_driver_packages', None))}")
- except:
+ archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(archinstall.storage.get('gfx_driver_packages', []))}")
+ except Exception as err:
+ archinstall.log(f"Could not handle nvidia and linuz-zen specific situations during xorg installation: {err}", level=logging.WARNING, fg="yellow")
archinstall.storage['installation_session'].add_additional_packages("xorg-server xorg-xinit") # Prep didn't run, so there's no driver to install