Skip to content

[RFC] packagesets: add basic imagetype yaml to merge pkgSets (non-symetric) - #1296

Closed
mvo5 wants to merge 1 commit into
osbuild:mainfrom
mvo5:yamlloader-merge-2
Closed

mvo5 wants to merge 1 commit into
osbuild:mainfrom
mvo5:yamlloader-merge-2

Conversation

@mvo5

@mvo5 mvo5 commented Mar 6, 2025 •

Copy link
Copy Markdown
Contributor

[draft as this is one possible way of doing it, all fedora package_sets.yaml needs converting, not a huge fan because it is not symmetrical but it is very simple. maybe different naming would make it feel less asymetric. alternative version of https://github.com/https://github.com//pull/1294 and https://github.com//pull/1295]

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 a new toplevel "image_types" in the package_sets.yaml.

It allows us to write:

image_types:
 qcow2:
  package_sets:
   - cloud_base_pkgset
   - qcow2_pkgset

package_sets:
  cloud_base_pkgset:
    include: [foo]
    exclude: [bar]
  qcow2_pkgset:
    include: [qemu-guest-agent]

The downside of this approach is that it is nice to read but not symetrical, i.e. one cannot just include the pkgset verbatim in an image_type, it always needs to be defined inside the "package_sets" key. It also uses the same "package_sets" name for two different things which is also slightly not nice.

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 a new toplevel "image_types" in the
package_sets.yaml.

It allows us to write:
```yaml
image_types:
 qcow2:
  package_sets:
   - cloud_base_pkgset
   - qcow2_pkgset

package_sets:
  cloud_base_pkgset:
    include: [foo]
    exclude: [bar]
  qcow2_pkgset:
    include: ["qemu-guest-agent"]
```
The downside of this approach is that it is nice to read but not
symetrical, i.e. one cannot just include the pkgset verbatim in
an `image_type`, it always needs to be defined inside the
"package_sets" key. It also uses the same "package_sets" name
for two different things which is also slightly not nice.
@mvo5 mvo5 changed the title packagesets: add basic imagetype yaml to merge pkgSets [RFC] packagesets: add basic imagetype yaml to merge pkgSets Mar 6, 2025
@supakeen

supakeen commented Mar 6, 2025

Copy link
Copy Markdown
Member

Stylistically I prefer #1295, it also seems like that one would more easily map on people who have knowledge of YAML as opposed to this one.

@mvo5 mvo5 changed the title [RFC] packagesets: add basic imagetype yaml to merge pkgSets [RFC] packagesets: add basic imagetype yaml to merge pkgSets (non-symetric) Mar 7, 2025
@mvo5

mvo5 commented Mar 10, 2025

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #1298

@mvo5 mvo5 closed this Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants