Skip to content

Commit

Permalink
Constants: Add bundle arch info to default bundle name
Browse files Browse the repository at this point in the history
From snc side, bundle name is contain the arch info so even after
extraction bundle name have arch info. This patch make sure that
arch info should be part of default name when compare during preflight
checks or during extraction. It will fix following when used with newly
created bundles.

```
INFO Downloading crc_libvirt_4.10.1.crcbundle
3.00 GiB / 3.00 GiB [---------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 5.71 MiB p/s
INFO Uncompressing /home/prkumar/.crc/cache/crc_libvirt_4.10.1.crcbundle
crc.qcow2: 12.20 GiB / 12.20 GiB [---------------------------------------------------------------------------------------------------------------------------------------------------] 100.00%
oc: 117.14 MiB / 117.14 MiB [--------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00%
Temporary error: rename /home/prkumar/.crc/cache/tmp-extract/crc_libvirt_4.10.1 /home/prkumar/.crc/cache/crc_libvirt_4.10.1: no such file or directory (x12)
```
  • Loading branch information
praveenkumar authored and anjannath committed Mar 8, 2022
1 parent 8126c07 commit a9e7d07
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/crc/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ func GetAdminHelperURL() string {
func defaultBundleForOs(preset crcpreset.Preset) map[string]string {
if preset == crcpreset.Podman {
return map[string]string{
"darwin": fmt.Sprintf("crc_podman_hyperkit_%s.crcbundle", version.GetPodmanVersion()),
"linux": fmt.Sprintf("crc_podman_libvirt_%s.crcbundle", version.GetPodmanVersion()),
"windows": fmt.Sprintf("crc_podman_hyperv_%s.crcbundle", version.GetPodmanVersion()),
"darwin": fmt.Sprintf("crc_podman_hyperkit_%s_%s.crcbundle", version.GetPodmanVersion(), runtime.GOARCH),
"linux": fmt.Sprintf("crc_podman_libvirt_%s_%s.crcbundle", version.GetPodmanVersion(), runtime.GOARCH),
"windows": fmt.Sprintf("crc_podman_hyperv_%s_%s.crcbundle", version.GetPodmanVersion(), runtime.GOARCH),
}
}
return map[string]string{
"darwin": fmt.Sprintf("crc_hyperkit_%s.crcbundle", version.GetBundleVersion()),
"linux": fmt.Sprintf("crc_libvirt_%s.crcbundle", version.GetBundleVersion()),
"windows": fmt.Sprintf("crc_hyperv_%s.crcbundle", version.GetBundleVersion()),
"darwin": fmt.Sprintf("crc_hyperkit_%s_%s.crcbundle", version.GetBundleVersion(), runtime.GOARCH),
"linux": fmt.Sprintf("crc_libvirt_%s_%s.crcbundle", version.GetBundleVersion(), runtime.GOARCH),
"windows": fmt.Sprintf("crc_hyperv_%s_%s.crcbundle", version.GetBundleVersion(), runtime.GOARCH),
}
}

Expand Down

0 comments on commit a9e7d07

Please sign in to comment.