debian-forge-composer/internal
Tomas Hozza fba9fe1072 Make the Distroregistry FromHost() return distro with correct name
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>
2021-05-14 15:43:00 +02:00
..
blueprint rhel84/grub2: set saved_entry 2021-02-20 20:01:15 +01:00
boot test: replace genisoimage with mkisofs 2021-04-02 14:21:29 +02:00
client Tests: remove fedoratest and replace it with test_distro 2021-05-14 15:43:00 +02:00
cloud/gcp GCP: Fix panic while parsing a specific build job log 2021-04-29 14:48:50 +02:00
cloudapi Rename all occurrences of "Compute Node" to "Compute Engine" 2021-04-01 20:12:39 +02:00
common weldr: move common.ComposeState to weldr 2020-11-09 14:17:19 +01:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk osbuild: rename package to osbuild1 2021-03-17 18:12:17 +00:00
distro Make the Distroregistry FromHost() return distro with correct name 2021-05-14 15:43:00 +02:00
distroregistry Make the Distroregistry FromHost() return distro with correct name 2021-05-14 15:43:00 +02:00
jobqueue jobqueue: Replace JobArgs() with Job() 2021-01-19 10:37:51 +01:00
jsondb jsondb: Allow passing nil as document to Read() 2020-05-13 16:45:09 +02:00
kojiapi Tests: remove fedoratest and replace it with test_distro 2021-05-14 15:43:00 +02:00
mocks Make the Distroregistry FromHost() return distro with correct name 2021-05-14 15:43:00 +02:00
osbuild1 distro/rhel84: build qcow2 images with compat=0.10 2021-04-10 19:18:13 +01:00
osbuild2 osbuild2: tar stage 2021-05-11 12:10:09 +02:00
reporegistry Add support for image type tags in rpmmd and add RepoRegistry API 2021-05-14 15:43:00 +02:00
rpmmd Add support for image type tags in rpmmd and add RepoRegistry API 2021-05-14 15:43:00 +02:00
store Tests: remove fedoratest and replace it with test_distro 2021-05-14 15:43:00 +02:00
target target/azure: document what it does 2021-03-06 15:40:48 +00:00
test test: add arch to the generate test artifact names 2020-12-01 08:27:44 +01:00
upload internal: Move GCP library to internal/cloud 2021-03-15 16:48:40 +00:00
weldr Tests: remove fedoratest and replace it with test_distro 2021-05-14 15:43:00 +02:00
worker Tests: remove fedoratest and replace it with test_distro 2021-05-14 15:43:00 +02:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00