Composer does not have 1:1 mapping of what can be the Host Distro name and the names of supported distributions held in the Distroregistry. The fact that the host distro `Name()` method as passed to the Weldr API does not return the same name as what is used as distro name for repository definitions. This makes it hard to use `distro.Distro` and `distro.Arch` directly and rely on the values returned by them as their name. Add `New*HostDistro()` to all distro definitions, accepting the name that should be returned by the distro's `Name()` method. This is useful mainly if the host distro is Beta or Stream variant of the distro. Change the distroregistry.Registry to contain host distro as a separate value set when creating it using `New()` function. This value is returned by `Registry.FromHost()` method. Determining the host distro is handled by the `NewDefault()` function. Move the distro name mangling to distroregistry package. Add relevant unit tests. Signed-off-by: Tomas Hozza <thozza@redhat.com> |
||
|---|---|---|
| .. | ||
| distro | ||
| rpmmd | ||