diff --git a/engine/resources/virt_builder.go b/engine/resources/virt_builder.go index be67b21a..ec6cb726 100644 --- a/engine/resources/virt_builder.go +++ b/engine/resources/virt_builder.go @@ -206,7 +206,7 @@ func (obj *VirtBuilderRes) getGuestfs() ([]string, error) { return nil, nil } - packages, exists := distroUtil.DistroToGuestfsPackages(distro) + packages, exists := distroUtil.ToGuestfsPackages(distro) if !exists { // TODO: patches welcome! return nil, fmt.Errorf("os/version is not supported") @@ -220,7 +220,7 @@ func (obj *VirtBuilderRes) getGuestfs() ([]string, error) { func (obj *VirtBuilderRes) getDeps() ([]string, error) { // TODO: Improve this function as things evolve. distro := strings.TrimSuffix(obj.OSVersion, "-") // fedora- or debian- - packages, exists := distroUtil.DistroToBootstrapPackages(distro) + packages, exists := distroUtil.ToBootstrapPackages(distro) if !exists { // TODO: patches welcome! return nil, fmt.Errorf("os version is not supported") diff --git a/lang/core/deploy/bootstrap_packages_func.go b/lang/core/deploy/bootstrap_packages_func.go index 2cbb4040..8ae95934 100644 --- a/lang/core/deploy/bootstrap_packages_func.go +++ b/lang/core/deploy/bootstrap_packages_func.go @@ -49,7 +49,7 @@ func init() { // for bootstrapping new machines which will need these installed before they // can run mgmt. func BootstrapPackages(ctx context.Context, input []types.Value) (types.Value, error) { - packages, exists := distroUtil.DistroToBootstrapPackages(input[0].Str()) + packages, exists := distroUtil.ToBootstrapPackages(input[0].Str()) if !exists { return nil, fmt.Errorf("missing distro") } diff --git a/util/distro/distro.go b/util/distro/distro.go index 24203de6..22c80300 100644 --- a/util/distro/distro.go +++ b/util/distro/distro.go @@ -85,17 +85,17 @@ var ( } ) -// DistroToBootstrapPackages returns the list of packages corresponding to the -// distro for bootstrapping. This returns false if the value doesn't exist. -func DistroToBootstrapPackages(distro string) ([]string, bool) { +// ToBootstrapPackages returns the list of packages corresponding to the distro +// for bootstrapping. This returns false if the value doesn't exist. +func ToBootstrapPackages(distro string) ([]string, bool) { l, exists := MapDistroToBootstrapPackages[distro] return l, exists } -// DistroToGuestfsPackages returns the list of packages corresponding to the -// distro for running the virt-builder software and guestfs suite. This returns -// false if the value doesn't exist. -func DistroToGuestfsPackages(distro string) ([]string, bool) { +// ToGuestfsPackages returns the list of packages corresponding to the distro +// for running the virt-builder software and guestfs suite. This returns false +// if the value doesn't exist. +func ToGuestfsPackages(distro string) ([]string, bool) { l, exists := MapDistroToGuestfsPackages[distro] return l, exists }