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

[OPENJDK-1335] microdnf update weak deps #332

Merged

Conversation

jmtd
Copy link
Member

@jmtd jmtd commented Dec 22, 2022

Part 1 of a 2-commit PR: I want to see CI red lights for this commit before pushing the fix.

This commit adds a test for some RPMs that are installed as transitive weak dependencies via microdnf when it is not configured with install_weak_deps=0.

https://issues.redhat.com/browse/OPENJDK-1335?filter=12398815

Ensure images do not have a set of RPMs installed which are not hard
dependencies of OpenJDK or Maven but might get installed as transitive
weak dependencies if microdnf is not configured with install_weak_deps=0

Signed-off-by: Jonathan Dowland <jdowland@redhat.com>
@jmtd
Copy link
Member Author

jmtd commented Dec 22, 2022

The new test passed for ubi8/openjdk-8 but shouldn't have. I think it's a race condition, due to using "available container log". I'm going to try just "container log". This unfortunately means a 30s wait per step in the scenario, but "correct" trumps "fast".

This is potentially racy. Use 'container log' instead.

Signed-off-by: Jonathan Dowland <jdowland@redhat.com>
Signed-off-by: Jonathan Dowland <jdowland@redhat.com>
@@ -4,7 +4,7 @@ set -euo pipefail
for candidate in yum dnf microdnf; do
if command -v "$candidate"; then
mgr="$(command -v "$candidate")"
"$mgr" update -y
"$mgr" update --setopt=install_weak_deps=0 -y
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also set --setopt=tsflags=nodocs that's what regular install commands have as well.

Signed-off-by: Jonathan Dowland <jdowland@redhat.com>
@jmtd jmtd force-pushed the OPENJDK-1335-microdnf-update-weak-deps branch from 3b81c0d to 6b7030a Compare December 22, 2022 13:58
Signed-off-by: Jonathan Dowland <jdowland@redhat.com>
@jmtd jmtd force-pushed the OPENJDK-1335-microdnf-update-weak-deps branch from d8e2234 to 760d7cf Compare December 22, 2022 16:09
@jmtd jmtd requested a review from jerboaa December 22, 2022 16:31
Copy link
Contributor

@jerboaa jerboaa 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. Thanks!

@jmtd jmtd merged commit 8806a2e into jboss-container-images:ubi8 Dec 22, 2022
@jmtd jmtd deleted the OPENJDK-1335-microdnf-update-weak-deps branch December 22, 2022 18:33
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.

None yet

2 participants