⚙️ Fixup runtime tree detection during join images

We need to hook up the runtime DB in order to query the correct part of
the tree
This commit is contained in:
mudler
2022-04-13 23:21:45 +02:00
parent 6bf91a0b60
commit 77c7eab1ee
7 changed files with 60 additions and 31 deletions

View File

@@ -133,11 +133,16 @@ Build packages specifying multiple definition trees:
db = pkg.NewInMemoryDatabase(false)
defer db.Clean()
runtimeDB := pkg.NewInMemoryDatabase(false)
defer runtimeDB.Clean()
installerRecipe := tree.NewInstallerRecipe(runtimeDB)
generalRecipe := tree.NewCompilerRecipe(db)
for _, src := range treePaths {
util.DefaultContext.Info("Loading tree", src)
helpers.CheckErr(generalRecipe.Load(src))
helpers.CheckErr(installerRecipe.Load(src))
}
if fromRepo {
@@ -172,6 +177,7 @@ Build packages specifying multiple definition trees:
options.WithTemplateFolder(templateFolders),
options.WithSolverOptions(opts),
options.Wait(wait),
options.WithRuntimeDatabase(installerRecipe.GetDatabase()),
options.OnlyTarget(onlyTarget),
options.PullFirst(pull),
options.KeepImg(keepImages),