debian-forge-composer/internal
Tomas Hozza e45e117a0b distro/rhel85: don't copy architecture when adding it to a distro
Originally, a copy of an architecture instance was always created when it
was added to a distro definition using the `addArches()` method.
However in reality, only a subset of structure members were copied,
which could create unexpected behavior and issues. This behavior is
identical to the behavior when image types are added to an architecture.
However the situation with image types differs in one aspect,
specifically that a single image type definition is usually reused
by multiple architecture definitions, while an architecture definition
is always used only by a single distribution definition.
Due to the fact that the image type contains a reference to the
architecture to which it has been added, the creation of a copy can not
be reasonably avoided. On the other hand, adding a copy of an architecture
to a distribution definition is not necessary.

Downside of creating copies of the architecture is that the image types
associated with it referred always to the original architecture
definition instance and not to the copy. So while references in the
direction of Distro -> Arch -> Image Type were correct and working, the
other direction was broken. Image Type -> (original) Arch -> (nil)
Distro.

Modify `distribution.AddArches()` method to directly add the passed
architecture instances to the distribution definition, instead of adding
their copies.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-24 15:54:00 +02:00
..
blueprint weldr: Add distro field to blueprints 2021-07-12 08:58:42 +02:00
boot upload/aws: add support for session tokens 2021-06-28 13:14:19 +03:00
client Add 2nd distribution to the NewTestAPI function 2021-07-12 08:58:42 +02:00
cloud/gcp test/api.sh: randomize used GCP zone from the region 2021-07-16 10:14:30 +02:00
cloudapi worker: add metrics 2021-07-23 21:54:28 +02:00
common common: helper function for uint64 ptr 2021-07-24 15:54:00 +02:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk disk: boot partition finder as partitiontable method 2021-07-24 15:54:00 +02:00
distro distro/rhel85: don't copy architecture when adding it to a distro 2021-07-24 15:54:00 +02:00
distroregistry distro: drop Fedora 32 2021-07-05 11:16:08 +02:00
jobqueue worker: Introduce heartbeats 2021-07-08 21:14:38 +01:00
jsondb jsondb: Allow passing nil as document to Read() 2020-05-13 16:45:09 +02:00
kojiapi worker: Move job tokens to the queue itself 2021-07-08 21:14:38 +01:00
mocks worker: Add identity filter and client oauth support 2021-06-17 10:08:35 +02:00
osbuild1 osbuild1: convert stage metadata from v2 2021-06-29 09:33:05 +01:00
osbuild2 qemu stage test squash 2021-07-24 15:54:00 +02:00
ostree ostree: add test for VerifyRef() 2021-06-18 14:02:09 +01:00
prometheus worker: add metrics 2021-07-23 21:54:28 +02:00
reporegistry reporegistry: Add a DistroHasRepos helper function 2021-07-12 08:58:42 +02:00
rpmmd rhel85: distro and arch package sets 2021-07-01 12:48:32 +02:00
store api_test: Test compose with 2nd distribution 2021-07-12 08:58:42 +02:00
target New upload target: AWS S3 2021-06-18 14:02:09 +01:00
test worker: Add identity filter and client oauth support 2021-06-17 10:08:35 +02:00
upload spec: drop hacks for Fedora 32 2021-07-05 11:16:08 +02:00
weldr weldr: Filter the list of supported distributions 2021-07-12 08:58:42 +02:00
worker worker: add metrics 2021-07-23 21:54:28 +02:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00