Skip to content

rpm: consult dnf database for repository information#869

Merged
github-actions[bot] merged 31 commits intoquay:mainfrom
hdonnay:hack/dnf
Jul 1, 2025
Merged

rpm: consult dnf database for repository information#869
github-actions[bot] merged 31 commits intoquay:mainfrom
hdonnay:hack/dnf

Conversation

@hdonnay
Copy link
Copy Markdown
Member

@hdonnay hdonnay commented Mar 13, 2023

These changes make the rhel machinery consult both the rpm and dnf databases when possible.

See-also: #809

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 12, 2024

Codecov Report

Attention: Patch coverage is 29.52381% with 74 lines in your changes missing coverage. Please review.

Project coverage is 55.23%. Comparing base (c2fc225) to head (57bb054).

Files Patch % Lines
rpm/dnf.go 25.71% 52 Missing ⚠️
rpm/packagescanner.go 14.28% 18 Missing ⚠️
rhel/coalescer.go 57.14% 1 Missing and 2 partials ⚠️
rpm/native_db.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #869      +/-   ##
==========================================
- Coverage   55.39%   55.23%   -0.17%     
==========================================
  Files         282      283       +1     
  Lines       17836    17923      +87     
==========================================
+ Hits         9881     9899      +18     
- Misses       6923     6990      +67     
- Partials     1032     1034       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hdonnay hdonnay changed the title wip: rpm: consult dnf database for repository information rpm: consult dnf database for repository information Dec 19, 2024
rpm/dnf.go Outdated
Comment on lines +49 to +52
if fi, err := fs.Stat(sys, `root/buildinfo/content_manifests`); errors.Is(err, nil) && fi.IsDir() {
// This is a RHEL layer, skip.
return nil, nil
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

  • Update this to check the files for a marker value and continue if found.

Should look for from_dnf_hint key in the yaml files.
See also: containerbuildsystem/atomic-reactor#2140

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Punting on this unless we determine it's needed.

@cgwalters
Copy link
Copy Markdown

I created rpm-software-management/rpm#3505 related to this

@hdonnay hdonnay force-pushed the hack/dnf branch 3 times, most recently from 10b07ff to e59f165 Compare January 13, 2025 15:57
@hdonnay hdonnay force-pushed the hack/dnf branch 3 times, most recently from 8c86d88 to 7a459ba Compare January 22, 2025 20:08
@hdonnay hdonnay marked this pull request as ready for review January 22, 2025 20:22
@hdonnay hdonnay requested a review from a team as a code owner January 22, 2025 20:22
@hdonnay hdonnay requested review from RTann and removed request for a team January 22, 2025 20:22
@RTann RTann requested a review from crozzy January 22, 2025 22:11
Copy link
Copy Markdown
Contributor

@RTann RTann left a comment

Choose a reason for hiding this comment

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

made it through most of the files, but I'll need to come back to this another time. Would you mind making more commits and then squashing things at the end so it's easier to see the diffs after each round? Thanks

hdonnay added 24 commits June 27, 2025 18:24
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
This adds two helpers: one to discover repoids, and one to annotate a
stream of Packages.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
I saw this and had to re-check why the short read wasn't handled, so
this adds a note explaining it.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
@hdonnay
Copy link
Copy Markdown
Member Author

hdonnay commented Jul 1, 2025

LGTM. Last question would be: have you tested this out on any Konflux-built images to see if everything works as expected (and the dnf database even exists)?

Not specifically, no.

@hdonnay
Copy link
Copy Markdown
Member Author

hdonnay commented Jul 1, 2025

/fast-forward

@github-actions github-actions bot merged commit 7f697ad into quay:main Jul 1, 2025
6 checks passed
@hdonnay hdonnay deleted the hack/dnf branch July 1, 2025 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants