From fc7ecb145f841c222f5f36532048bad458827356 Mon Sep 17 00:00:00 2001 From: mprahl Date: Mon, 11 Nov 2019 11:01:42 -0500 Subject: [PATCH] Configure the MBS backend code to use the correct SQLite database during local builds --- module_build_service/manage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module_build_service/manage.py b/module_build_service/manage.py index 0b0c74bd..8fc1e198 100755 --- a/module_build_service/manage.py +++ b/module_build_service/manage.py @@ -144,6 +144,9 @@ def build_module_locally( os.remove(dbpath) db.create_all() + # Reconfigure the backend database session registry to use the new the database location + db_session.remove() + db_session.configure(bind=db.session.bind) params = { "local_build": True, @@ -158,8 +161,6 @@ def build_module_locally( yaml_file_path = os.path.abspath(yaml_file) - from module_build_service.db_session import db_session - if offline: import_builds_from_local_dnf_repos(platform_id) load_local_builds(local_build_nsvs)