index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-03-21 15:16:41 +0100 |
---|---|---|
committer | Anton Hvornum <anton@hvornum.se> | 2021-03-21 15:16:41 +0100 |
commit | 60817334224a8ade4c7e600498fe9bd8f540bf29 (patch) | |
tree | c7c10018a0bc48936d01cd2a7f85691e516f086f /archinstall/lib/profiles.py | |
parent | a9f177e722d80ecbacb0c8e74ea0e8a4b88212be (diff) |
-rw-r--r-- | archinstall/lib/profiles.py | 15 |
diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py index a0f2dc77..34ba09da 100644 --- a/archinstall/lib/profiles.py +++ b/archinstall/lib/profiles.py @@ -76,6 +76,7 @@ class Script(): self.spec = None self.examples = None self.namespace = os.path.splitext(os.path.basename(self.path))[0] + self.original_namespace = self.namespace print(f"Script {self} loaded with namespace: {self.namespace}") def __enter__(self, *args, **kwargs): @@ -149,7 +150,6 @@ class Script(): class Profile(Script): def __init__(self, installer, path, args={}): super(Profile, self).__init__(path, installer) - self._cache = None def __dump__(self, *args, **kwargs): return {'path' : self.path} @@ -158,6 +158,10 @@ class Profile(Script): return f'Profile({os.path.basename(self.profile)})' def install(self): + # Before installing, revert any temporary changes to the namespace. + # This ensures that the namespace during installation is the original initation namespace. + # (For instance awesome instead of aweosme.py or app-awesome.py) + self.namespace = self.original_namespace return self.execute() def has_prep_function(self): @@ -206,4 +210,11 @@ class Application(Profile): elif parsed_url.scheme in ('https', 'http'): return self.localize_path(self.profile) else: - raise ProfileNotFound(f"Application cannot handle scheme {parsed_url.scheme}")
\ No newline at end of file + raise ProfileNotFound(f"Application cannot handle scheme {parsed_url.scheme}") + + def install(self): + # Before installing, revert any temporary changes to the namespace. + # This ensures that the namespace during installation is the original initation namespace. + # (For instance awesome instead of aweosme.py or app-awesome.py) + self.namespace = self.original_namespace + return self.execute()
\ No newline at end of file |