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

rpmmd,dnfjson: add Path, RepoID to PackageSpec for librepo #1140

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Jan 14, 2025

This commit adds the two new Path and RepoID fields to the rpmmd.PackageSpec so that librepo can use them as it needs to correlate a package to a repo to generate the right mirror id.

Ideally we would also make sure the inputs to manifest.Serialize() only accepts depsolved packageSets/repoConfigs via static type checking. There is a TODO for this now but it's not done in this commit as it requires some more thinking/discussion. But because of the strict requirement for matching packageSpec.RepoID and repoConfig.Id we should try to make this type safe. The repoConfig.Id is really only guranteed after the depsolve() run.

[split out from https://github.com//pull/1132 with improved docs/tests]

This commit adds the two new `Path` and `RepoID` fields to the
rpmmd.PackageSpec so that librepo can use them as it needs to
correlate a package to a repo to generate the right mirror id.

Ideally we would also make sure the inputs to manifest.Serialize()
only accepts depsolved packageSets/repoConfigs via static type
checking. There is a TODO for this now but it's not done in this
commit as it requires some more thinking/discussion. But because
of the strict requirement for matching packageSpec.RepoID and
repoConfig.Id we should try to make this type safe. The
repoConfig.Id is really only guranteed after the depsolve() run.
Copy link
Member

@thozza thozza left a comment

Choose a reason for hiding this comment

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

LGTM

@mvo5 mvo5 added this pull request to the merge queue Jan 14, 2025
Merged via the queue into osbuild:main with commit 1031975 Jan 14, 2025
18 checks passed
@mvo5 mvo5 deleted the add-path-repoid branch January 14, 2025 17:15
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