Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorYash Tripathi <tripathiyash97@gmail.com>2021-05-24 19:23:08 +0530
committerYash Tripathi <tripathiyash97@gmail.com>2021-05-24 22:12:25 +0530
commit2aed8c6ad5a8ab31accb6d618bca4798591cf415 (patch)
tree1eb1c55942dda86fd749fbce223284847a40ddc6 /profiles
parent7daaf1143fca2723bfb63ab4e3030485446da1c0 (diff)
removed builtins usage and added gfx_package key in config
Diffstat (limited to 'profiles')
-rw-r--r--profiles/sway.py6
-rw-r--r--profiles/xorg.py8
2 files changed, 7 insertions, 7 deletions
diff --git a/profiles/sway.py b/profiles/sway.py
index 9afc047d..b0ff8c19 100644
--- a/profiles/sway.py
+++ b/profiles/sway.py
@@ -25,7 +25,7 @@ def _prep_function(*args, **kwargs):
other code in this stage. So it's a safe way to ask the user
for more input before any other installer steps start.
"""
- __builtins__["_gfx_driver_packages"] = archinstall.select_driver()
+ archinstall.storage["gfx_driver_packages"] = archinstall.select_driver()
return True
@@ -34,7 +34,7 @@ def _prep_function(*args, **kwargs):
# through importlib.util.spec_from_file_location("sway", "/somewhere/sway.py")
# or through conventional import sway
if __name__ == "sway":
- if "nvidia" in _gfx_driver_packages:
+ if "nvidia" in archinstall.storage.get("gfx_driver_packages", None):
choice = input("The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] ")
if choice.lower() in ("n", ""):
raise archinstall.lib.exceptions.HardwareIncompatibilityError("Sway does not support the proprietary nvidia drivers.")
@@ -43,4 +43,4 @@ if __name__ == "sway":
archinstall.storage['installation_session'].add_additional_packages(__packages__)
# Install the graphics driver packages
- archinstall.storage['installation_session'].add_additional_packages(_gfx_driver_packages)
+ archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(archinstall.storage.get('gfx_driver_packages', None))}")
diff --git a/profiles/xorg.py b/profiles/xorg.py
index b8fb2cbb..9006a430 100644
--- a/profiles/xorg.py
+++ b/profiles/xorg.py
@@ -22,7 +22,7 @@ def _prep_function(*args, **kwargs):
for more input before any other installer steps start.
"""
- __builtins__['_gfx_driver_packages'] = archinstall.select_driver()
+ archinstall.storage["gfx_driver_packages"] = archinstall.select_driver()
# TODO: Add language section and/or merge it with the locale selected
# earlier in for instance guided.py installer.
@@ -35,13 +35,13 @@ def _prep_function(*args, **kwargs):
# or through conventional import xorg
if __name__ == 'xorg':
try:
- if "nvidia" in _gfx_driver_packages:
+ if "nvidia" in archinstall.storage.get("gfx_driver_packages", None):
if "linux-zen" in archinstall.storage['installation_session'].base_packages or "linux-lts" in archinstall.storage['installation_session'].base_packages:
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(_gfx_driver_packages)}")
+ archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(archinstall.storage.get('gfx_driver_packages', None))}")
else:
- archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}")
+ 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("xorg-server xorg-xinit") # Prep didn't run, so there's no driver to install