mirror of
https://github.com/mudler/luet.git
synced 2025-09-01 15:18:28 +00:00
Implement compilation with images
A compilespec with an image defined (and no seed) can now be compiled, and an artifact delta is provided at the end of the process.
This commit is contained in:
@@ -47,12 +47,13 @@ func (r *CompilerRecipe) Load(path string) error {
|
||||
r.PackageTree = NewDefaultTree()
|
||||
}
|
||||
|
||||
tmpfile, err := ioutil.TempFile("", "luet")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
//tmpfile, err := ioutil.TempFile("", "luet")
|
||||
//if err != nil {
|
||||
// return err
|
||||
//}
|
||||
|
||||
r.Tree().SetPackageSet(pkg.NewBoltDatabase(tmpfile.Name()))
|
||||
r.Tree().SetPackageSet(pkg.NewInMemoryDatabase(false))
|
||||
//r.Tree().SetPackageSet(pkg.NewBoltDatabase(tmpfile.Name()))
|
||||
// TODO: Handle cleaning after? Cleanup implemented in GetPackageSet().Clean()
|
||||
|
||||
// the function that handles each file or dir
|
||||
@@ -97,7 +98,7 @@ func (r *CompilerRecipe) Load(path string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
err = filepath.Walk(path, ff)
|
||||
err := filepath.Walk(path, ff)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user