diff --git a/pkg/installer/client/local.go b/pkg/installer/client/local.go index 6e1a41cb..351c9145 100644 --- a/pkg/installer/client/local.go +++ b/pkg/installer/client/local.go @@ -38,15 +38,26 @@ func NewLocalClient(r RepoData) *LocalClient { func (c *LocalClient) DownloadArtifact(artifact compiler.Artifact) (compiler.Artifact, error) { var err error + rootfs := "" artifactName := path.Base(artifact.GetPath()) cacheFile := filepath.Join(config.LuetCfg.GetSystem().GetSystemPkgsCacheDirPath(), artifactName) + if !config.LuetCfg.ConfigFromHost { + rootfs, err = config.LuetCfg.GetSystem().GetRootFsAbs() + if err != nil { + return nil, err + } + } + // Check if file is already in cache if helpers.Exists(cacheFile) { Info("Use artifact", artifactName, "from cache.") } else { ok := false for _, uri := range c.RepoData.Urls { + + uri = filepath.Join(rootfs, uri) + Info("Downloading artifact", artifactName, "from", uri) //defer os.Remove(file.Name())