diff options
Diffstat (limited to 'yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands')
-rw-r--r-- | yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py | 22 | ||||
-rw-r--r-- | yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 24 |
2 files changed, 2 insertions, 44 deletions
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py index 3ccc7c67c..b2c573c9e 100644 --- a/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py @@ -64,27 +64,6 @@ class Command(NoArgsCommand): return "" return DN(self._find_first_path_for_file(DN(self.guesspath), "bblayers.conf", 4)) - - def _verify_artifact_storage_dir(self): - # verify that we have a settings for downloading artifacts - while ToasterSetting.objects.filter(name="ARTIFACTS_STORAGE_DIR").count() == 0: - guessedpath = os.getcwd() + "/toaster_build_artifacts/" - print("\nToaster needs to know in which directory it can download build log files and other artifacts.\nToaster suggests \"%s\"." % guessedpath) - artifacts_storage_dir = raw_input("Press Enter to select \"%s\" or type the full path to a different directory: " % guessedpath) - if len(artifacts_storage_dir) == 0: - artifacts_storage_dir = guessedpath - if len(artifacts_storage_dir) > 0 and artifacts_storage_dir.startswith("/"): - try: - os.makedirs(artifacts_storage_dir) - except OSError as ose: - if "File exists" in str(ose): - pass - else: - raise ose - ToasterSetting.objects.create(name="ARTIFACTS_STORAGE_DIR", value=artifacts_storage_dir) - return 0 - - def _verify_build_environment(self): # refuse to start if we have no build environments while BuildEnvironment.objects.count() == 0: @@ -239,7 +218,6 @@ class Command(NoArgsCommand): def handle_noargs(self, **options): retval = 0 - retval += self._verify_artifact_storage_dir() retval += self._verify_build_environment() retval += self._verify_default_settings() retval += self._verify_builds_in_progress() diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index c3e9b74c0..718e1441d 100644 --- a/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py @@ -77,31 +77,11 @@ class Command(NoArgsCommand): bec.be.save() def archive(self): - ''' archives data from the builds ''' - artifact_storage_dir = ToasterSetting.objects.get(name="ARTIFACTS_STORAGE_DIR").value for br in BuildRequest.objects.filter(state = BuildRequest.REQ_ARCHIVE): - # save cooker log if br.build == None: br.state = BuildRequest.REQ_FAILED - br.save() - continue - build_artifact_storage_dir = os.path.join(artifact_storage_dir, "%d" % br.build.pk) - try: - os.makedirs(build_artifact_storage_dir) - except OSError as ose: - if "File exists" in str(ose): - pass - else: - raise ose - - file_name = os.path.join(build_artifact_storage_dir, "cooker_log.txt") - try: - with open(file_name, "w") as f: - f.write(br.environment.get_artifact(br.build.cooker_log_path).read()) - except IOError: - os.unlink(file_name) - - br.state = BuildRequest.REQ_COMPLETED + else: + br.state = BuildRequest.REQ_COMPLETED br.save() def cleanup(self): |