mirror of
https://github.com/containers/podman.git
synced 2025-11-01 02:42:11 +08:00
Prune FCOS related code
Given the switch to pulling oci artifacts for podman, we no longer need a fair bit of fedora coreos code for automatically downloading images. [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -5,9 +5,10 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"runtime"
|
||||
|
||||
"github.com/containers/podman/v5/pkg/machine"
|
||||
"github.com/containers/podman/v5/pkg/machine/define"
|
||||
"github.com/containers/podman/v5/pkg/machine/vmconfigs"
|
||||
"github.com/coreos/stream-metadata-go/fedoracoreos"
|
||||
"github.com/coreos/stream-metadata-go/stream"
|
||||
"github.com/sirupsen/logrus"
|
||||
@ -49,11 +50,15 @@ func GetDownload(vmType define.VMType) (string, error) {
|
||||
format = "qcow2.xz"
|
||||
}
|
||||
|
||||
arch, ok := fcosstable.Architectures[machine.GetFcosArch()]
|
||||
arch, err := vmconfigs.NormalizeMachineArch(runtime.GOARCH)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
fcosArch, ok := fcosstable.Architectures[arch]
|
||||
if !ok {
|
||||
return "", fmt.Errorf("unable to pull VM image: no targetArch in stream")
|
||||
}
|
||||
upstreamArtifacts := arch.Artifacts
|
||||
upstreamArtifacts := fcosArch.Artifacts
|
||||
if upstreamArtifacts == nil {
|
||||
return "", fmt.Errorf("unable to pull VM image: no artifact in stream")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user