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] In the symlinks inspection, honor transitive Requires #1309

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

dcantrell
Copy link
Collaborator

A package with automatic shared library dependencies usually require an explicit Requires on the %{name} = %{version}-%{release}. This is done to ensure subpackages don't drift from the main package when performing upgrades. However, it is also possible to have those explicit Requires handled by transitive Requires. That is having an explicit Requires on a package that then itself has an explicit Requires on the package you need. This commit implements that check when looking for explicit Requires and treats it as satisifed.

Fixes: #1231

A package with automatic shared library dependencies usually require
an explicit Requires on the %{name} = %{version}-%{release}.  This is
done to ensure subpackages don't drift from the main package when
performing upgrades.  However, it is also possible to have those
explicit Requires handled by transitive Requires.  That is having an
explicit Requires on a package that then itself has an explicit
Requires on the package you need.  This commit implements that check
when looking for explicit Requires and treats it as satisifed.

Fixes: rpminspect#1231

Signed-off-by: David Cantrell <dcantrell@redhat.com>
@dcantrell dcantrell added this to the v2.0 milestone Nov 30, 2023
@dcantrell dcantrell self-assigned this Nov 30, 2023
Copy link
Member

@evan-goode evan-goode left a comment

Choose a reason for hiding this comment

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

Looks good, do you think this deserves a test?

lib/inspect_rpmdeps.c Outdated Show resolved Hide resolved
@dcantrell
Copy link
Collaborator Author

Looks good, do you think this deserves a test?

Yes, it does. I'm fixing up the test suite and adding some new tests for the transitive explicit Requires handling.

If we find our explicit Requires in the transitive search loop, go
ahead and break out early.

Signed-off-by: David Cantrell <dcantrell@redhat.com>
The transitive list may be empty when we reach this while loop, so
don't assume it actually has anything in it.

Signed-off-by: David Cantrell <dcantrell@redhat.com>
Signed-off-by: David Cantrell <dcantrell@redhat.com>
@dcantrell dcantrell merged commit ff41169 into rpminspect:main Dec 5, 2023
7 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.

rpminspect complains about missing depedency that is provided transitively
2 participants