1
0

fix: load, not import

This commit is contained in:
dump_stack() 2024-02-21 18:31:33 +00:00
parent 451566d27f
commit 35df5850f5
Signed by: dump_stack
GPG Key ID: C9905BA72B5E02BB
3 changed files with 5 additions and 5 deletions

View File

@ -175,7 +175,7 @@ func (cmd *KernelCmd) fetchContainerCache(c container.Container) {
}
path := cache.ContainerURL(c.Name())
err := container.Import(path, c.Name())
err := container.Load(path, c.Name())
if err == nil {
log.Info().Msgf("container %s -> %s", path, c.Name())
}

View File

@ -77,13 +77,13 @@ func Images() (diis []Image, err error) {
return
}
func Import(path, name string) (err error) {
func Load(path, name string) (err error) {
exist := Container{name: name}.Exist()
if exist && UseCache {
return
}
cmd := exec.Command(Runtime, "import", path, name)
cmd := exec.Command(Runtime, "load", path, name)
log.Debug().Msgf("%v", cmd)
raw, err := cmd.CombinedOutput()

View File

@ -53,14 +53,14 @@ func (suse OpenSUSE) Packages() (pkgs []string, err error) {
}
cnturl := cache.ContainerURL(cnt)
err = container.Import(cnturl, name)
err = container.Load(cnturl, name)
if err != nil {
return
}
} else if strings.HasPrefix(suse.release, "13") {
name = "opensuse:13"
cnturl := cache.ContainerURL("openSUSE-13.2")
err = container.Import(cnturl, name)
err = container.Load(cnturl, name)
if err != nil {
return
}