Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorDylan Taylor <dylan@dylanmtaylor.com>2021-04-07 09:12:33 -0400
committerDylan Taylor <dylan@dylanmtaylor.com>2021-04-07 09:23:08 -0400
commitf85fb66bc61ee9b90537da59be00b37f49e5ffb8 (patch)
treeb5c22216a14d7aeb2e95c6b1b600d98bc43f9431 /archinstall
parentac7d980f8920b90e213acf95ca87b459eb072f3a (diff)
Add filtration on top level profile
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/profiles.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py
index 39411553..1948a819 100644
--- a/archinstall/lib/profiles.py
+++ b/archinstall/lib/profiles.py
@@ -177,6 +177,7 @@ class Profile(Script):
if hasattr(imported, '_prep_function'):
return True
return False
+
def has_post_install(self):
with open(self.path, 'r') as source:
source_data = source.read()
@@ -193,6 +194,13 @@ class Profile(Script):
if hasattr(imported, '_post_install'):
return True
+ def is_top_level_profile(self):
+ with open(self.path, 'r') as source:
+ source_data = source.read()
+
+ # TODO: I imagine that there is probably a better way to write this.
+ return 'top_level_profile = True' in source_data
+
@property
def packages(self) -> list:
"""