Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external: add new get-dnf4-package-info external #226

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Sep 25, 2024

external: add new get-dnf4-package-info external

This commit adds a new get-dnf4-package-info external that can
be used to extract details about a dnf4 resolved package.

The main use-case is the kernel package where we need some details
like the version number to put into the grub stage. With this
commit we can do something like:

  kernel:
    package:
      otk.external.osbuild-get-dnf4-package-info:
        packageset: ${packages.os}
        package_name: ${modifications.kernel_package_name}

example: use new osbuild-get-dnf4-package-info external

This commit uses the new osbuild-get-dnf4-package-info for the
real otk examples.


external: update mock data in gen_depsolve_dnf4 to follow
images

This commit updates the generated mock meta-data from the
gen_depsolve_dnf4 to follow the gen_manifests updates from the
images library, most notably:
osbuild/images#937
osbuild/images#943

Alternative idea to #205 which avoids the issues that we need nested ${packages.${kerel.pkgname}} declarations.

supakeen
supakeen previously approved these changes Sep 26, 2024
Copy link
Member

@supakeen supakeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea to have an external to do this to dodge other problems indicated in the other PR.

src/otk_external_osbuild/command/get_dnf4_package_info.py Outdated Show resolved Hide resolved
achilleas-k
achilleas-k previously approved these changes Sep 26, 2024
This commit updates the generated mock meta-data from the
`gen_depsolve_dnf4` to follow the `gen_manifests` updates from the
images library, most notably:
osbuild/images#937
osbuild/images#943
This commit adds a new `get-dnf4-package-info` external that can
be used to extract details about a dnf4 resolved package.

The main use-case is the kernel package where we need some details
like the version number to put into the grub stage. With this
commit we can do something like:
```yaml
  kernel:
    package:
      otk.external.osbuild-get-dnf4-package-info:
        packageset: ${packages.os}
        packagename: ${modifications.kernel_package_name}
```
This commit uses the new `osbuild-get-dnf4-package-info` for the
real otk examples.
@supakeen supakeen added this pull request to the merge queue Sep 26, 2024
Merged via the queue into osbuild:main with commit 07dfe2b Sep 26, 2024
3 checks passed
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.

3 participants