Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/installer.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-05-14 15:11:38 +0000
committerGitHub <noreply@github.com>2021-05-14 15:11:38 +0000
commitda0af2294a36f73936473a138639a94958b06460 (patch)
treeb74cc3418d2243adad9bcb490cd7713e122f3053 /archinstall/lib/installer.py
parentdf6c4e77f721da2b03a510548d281992b25987b2 (diff)
parent22750cefc89e6439d14a5df105af17e4e85eb3cc (diff)
Merge pull request #430 from archlinux/torxed-fix-magic-variables
BC: Replaced the magic __builtin__ global variable for installation
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 331762b4..e5120ff1 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -452,14 +452,7 @@ class Installer():
return self.pacstrap(*packages)
def install_profile(self, profile):
- # TODO: Replace this with a import archinstall.session instead in the profiles.
- # The tricky thing with doing the import archinstall.session instead is that
- # profiles might be run from a different chroot, and there's no way we can
- # guarantee file-path safety when accessing the installer object that way.
- # Doing the __builtins__ replacement, ensures that the global variable "installation"
- # is always kept up to date. It's considered a nasty hack - but it's a safe way
- # of ensuring 100% accuracy of archinstall session variables.
- __builtins__['installation'] = self
+ storage['installation_session'] = self
if type(profile) == str:
profile = Profile(self, profile)