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

fix(pkg): Handle single-target runtimes repackaging #894

Conversation

nderjung
Copy link
Member

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran make fmt on your commit series before opening this PR;
  • Updated relevant documentation.

Description of changes

This commit fixes an issue where a user would run kraft pkg with using a Kraftfile that uses the runtime element and the runtime element returns from the Catalog a single target. Previously, the host platform and architecture were used when they were unset at the commandline and set to the host's platform and architecture. Instead, query the catalog without these set and check if only a single entry is returned. If it does, the user only wants to re-package this. If we get more options then use the host architecture and platform and re-query the catalog.

This commit fixes an issue where a user would run `kraft pkg` with using
a `Kraftfile` that uses the `runtime` element and the `runtime` element
returns from the `Catalog` a single target.  Previously, the host
platform and architecture were used when they were unset at the
commandline and set to the host's platform and architecture.  Instead,
query the catalog without these set and check if only a single entry is
returned.  If it does, the user only wants to re-package this.  If we
get more options then use the host architecture and platform and
re-query the catalog.

Signed-off-by: Alexander Jung <alex@unikraft.io>
Copy link
Member

@craciunoiuc craciunoiuc left a comment

Choose a reason for hiding this comment

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

All good here. Thanks!

Reviewed-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.io
Approved-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.io

@craciunoiuc craciunoiuc merged commit b74ce5e into unikraft:staging Oct 23, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🚀 Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants