Tools: build_binaries.py: ensure existence of buildlogs dir

If buildlogs didn't exist then the sqlite database creation would fail.

This really shouldn't have been done in init anyway...
This commit is contained in:
Peter Barker 2022-02-26 11:46:53 +11:00 committed by Peter Barker
parent f5766bb098
commit f79c43eebd

View File

@ -67,9 +67,6 @@ class build_binaries(object):
def __init__(self, tags):
self.tags = tags
self.dirty = False
binaries_history_filepath = os.path.join(self.buildlogs_dirpath(),
"build_binaries_history.sqlite")
self.history = build_binaries_history.BuildBinariesHistory(binaries_history_filepath)
def progress(self, string):
'''pretty-print progress'''
@ -669,6 +666,12 @@ is bob we will attempt to checkout bob-AVR'''
def run(self):
self.validate()
self.mkpath(self.buildlogs_dirpath())
binaries_history_filepath = os.path.join(
self.buildlogs_dirpath(), "build_binaries_history.sqlite")
self.history = build_binaries_history.BuildBinariesHistory(binaries_history_filepath)
prefix_bin_dirpath = os.path.join(os.environ.get('HOME'),
"prefix", "bin")
origin_env_path = os.environ.get("PATH")