summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py')
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
index 5d80bc7155..1ff5c92833 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
@@ -62,6 +62,23 @@ class Command(NoArgsCommand):
62 62
63 63
64 def handle(self, **options): 64 def handle(self, **options):
65 # verify that we have a settings for downloading artifacts
66 while ToasterSetting.objects.filter(name="ARTIFACTS_STORAGE_DIR").count() == 0:
67 guessedpath = os.getcwd() + "/toaster_build_artifacts/"
68 print("Toaster needs to know in which directory it can download build log files and other artifacts.\n Toaster suggests \"%s\"." % guessedpath)
69 artifacts_storage_dir = raw_input(" Press Enter to select \"%s\" or type the full path to a different directory: " % guessedpath)
70 if len(artifacts_storage_dir) == 0:
71 artifacts_storage_dir = guessedpath
72 if len(artifacts_storage_dir) > 0 and artifacts_storage_dir.startswith("/"):
73 try:
74 os.makedirs(artifacts_storage_dir)
75 except OSError as ose:
76 if "File exists" in str(ose):
77 pass
78 else:
79 raise ose
80 ToasterSetting.objects.create(name="ARTIFACTS_STORAGE_DIR", value=artifacts_storage_dir)
81
65 self.guesspath = DN(DN(DN(DN(DN(DN(DN(__file__))))))) 82 self.guesspath = DN(DN(DN(DN(DN(DN(DN(__file__)))))))
66 # refuse to start if we have no build environments 83 # refuse to start if we have no build environments
67 while BuildEnvironment.objects.count() == 0: 84 while BuildEnvironment.objects.count() == 0: