Repository navigation
Conversation
This commit adds a basic imagetype yaml to support merging
of package sets This is a useful feature so that we can e.g.
avoid duplicating the `cloud_base` or `anaconda` package sets.
It works by adding new toplevels "image_types" and
"virtual_package_sets" in the package_sets.yaml and then using
anchors/refs to refer to them in the image_type yaml.
It allows us to write:
```yaml
virtual_package_sets:
base: &base_pkgset
include: [from-base-inc]
exclude: [from-base-exc]
condition:
distro_name:
test-distro:
include: [from-base-condition-inc]
exclude: [from-base-condition-exc]
image_types:
other_type:
package_sets:
- &other_type_pkgset
include: [from-other-type-inc]
exclude: [from-other-type-exc]
test_type:
package_sets:
- *base_pkgset
- *other_type_pkgset
- include: [from-type-inc]
exclude: [from-type-exc]
condition:
distro_name:
test-distro:
include: [from-condition-inc]
exclude: [from-condition-exc]
```
The downside of this approach is that:
1. it requires the anchor to be there before the ref, which can
be confusing (we could solve this later via includes)
2. if the anchor is forgotten the error becomes very obscure
3. its a bit "hardcore" yaml
The upside is that it is very symetrical and actually feels quite
nice.
Member
|
I like this one more than #1296, I'll take a look at the implementation tomorrow. |
Contributor
Author
|
Closing this in favor of #1298 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[draft as this is one possible way of doing it, all fedora package_sets.yaml needs converting, I like this because its very symetric but it is not perfect, alternative version of https://github.com//pull/1294 and https://github.com//pull/1296]
This commit adds a basic imagetype yaml to support merging of package sets This is a useful feature so that we can e.g. avoid duplicating the
cloud_baseoranacondapackage sets.It works by adding new toplevels "image_types" and "virtual_package_sets" in the package_sets.yaml and then using anchors/refs to refer to them in the image_type yaml.
It allows us to write:
The downside of this approach is that:
The upside is that it is very symetrical and actually feels quite nice.