-
Notifications
You must be signed in to change notification settings - Fork 79
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
rpm: implement an RPM filescanner to discern RPM filepaths #1320
base: main
Are you sure you want to change the base?
Conversation
21db95f
to
f1bafd3
Compare
@@ -5,6 +5,7 @@ type FileKind string | |||
|
|||
const ( | |||
FileKindWhiteout = FileKind("whiteout") | |||
FileKindRPM = FileKind("rpm") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So every file's "kind" is effectively the component that noticed it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose in theory any filescanner can create any FileKind
and any Resolver
can be interested in any FileType
or perhaps multiple in the future, so the name is kind of arbitrary. Do you think the kind could be better named?
6e33ee1
to
217186a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1320 +/- ##
==========================================
+ Coverage 56.24% 56.33% +0.08%
==========================================
Files 266 268 +2
Lines 16838 16939 +101
==========================================
+ Hits 9471 9542 +71
- Misses 6402 6421 +19
- Partials 965 976 +11 ☔ View full report in Codecov by Sentry. |
a248d33
to
9faca9c
Compare
I think I'll probably add some more test cases to the resolver but it'd be good to get some eyes on again. |
66ca82d
to
74673cc
Compare
We should be accounting for more than one file per layer and therefore this change (from map[layer_id]claircore.File to map[layer_id][]claircore.File) is needed. Signed-off-by: crozzy <joseph.crosland@gmail.com>
Using the filepaths discovered by the RPM filescanner we can judge whether or not a language package has been installed via RPM or not. Signed-off-by: crozzy <joseph.crosland@gmail.com>
The Resolver compares file paths gleaned from RPM DBs and compares them to a Package.Filepath to try and determine if a package needs to be removed from an index report because its RPM counterpart has already been included. Signed-off-by: crozzy <joseph.crosland@gmail.com>
Using the filepaths discovered by the RPM filescanner we can judge whether or not a language package has been installed via RPM or not.
TODO: