1
0

Revert "fix: load, not import"

This reverts commit 35df5850f5.
This commit is contained in:
dump_stack() 2024-02-21 18:55:48 +00:00
parent 4a1422e010
commit 8251927821
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()) path := cache.ContainerURL(c.Name())
err := container.Load(path, c.Name()) err := container.Import(path, c.Name())
if err == nil { if err == nil {
log.Info().Msgf("container %s -> %s", path, c.Name()) log.Info().Msgf("container %s -> %s", path, c.Name())
} }

View File

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

View File

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