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

container: run dnf check in container for dnf4/dnf5 compat #658

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

mvo5
Copy link
Collaborator

@mvo5 mvo5 commented Sep 25, 2024

This is an alternative idea to PR#651 - we run dnf inside the
container to init the dnf system. However with dnf5 this no
longer works and it just throws an error.

So instead we run dnf check which should work on both dnf{4,5}.


test: move target-arch-smoke testcases to Fedora42 (for
dnf5)

This will give us testing for dnf5 as well.

[draft until tests are good and I double checked dnf sources]

@ondrejbudai
Copy link
Member

It works just fine with dnf 4:

# time dnf check
Updating Subscription Management repositories.

________________________________________________________
Executed in    1.80 secs      fish           external
   usr time    8.23 millis  229.00 micros    8.00 millis
   sys time   17.53 millis  333.00 micros   17.20 millis

However, it's quite slow with dnf 5:

# time dnf check

________________________________________________________
Executed in   24.95 secs      fish           external
   usr time    5.38 millis  314.00 micros    5.07 millis
   sys time    9.21 millis   37.00 micros    9.17 millis

mvo5 and others added 2 commits September 26, 2024 11:10
This will give us testing for dnf5 as well.
This is an alternative idea to PR#651 - we run `dnf` inside the
container to init the dnf system. However with `dnf5` this no
longer works and it just throws an error.

So instead we run `dnf check --duplicates` which should work on
both dnf{4,5} and is reasonable fast. Just running `dnf check`
works as well but with dnf5 takes around 20s on my system and
`dnf5 check --duplicates` only 0.7s.

Co-authored-by: Hristo Marinov <hricky@mail.bg>
@mvo5 mvo5 marked this pull request as ready for review September 26, 2024 09:15
@mvo5
Copy link
Collaborator Author

mvo5 commented Sep 26, 2024

It works just fine with dnf 4:

# time dnf check
Updating Subscription Management repositories.

________________________________________________________
Executed in    1.80 secs      fish           external
   usr time    8.23 millis  229.00 micros    8.00 millis
   sys time   17.53 millis  333.00 micros   17.20 millis

However, it's quite slow with dnf 5:

# time dnf check

________________________________________________________
Executed in   24.95 secs      fish           external
   usr time    5.38 millis  314.00 micros    5.07 millis
   sys time    9.21 millis   37.00 micros    9.17 millis

Thanks for checking this ! I switched now to use dnf check --duplicates which takes around 1s for me compared to the 20s the dnf check takes with dnf5. That seems like a reasonable compromise(?).

@mvo5 mvo5 requested a review from ondrejbudai September 26, 2024 10:50
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

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

Checked on my system, works like a charm! Thanks!

@ondrejbudai ondrejbudai added this pull request to the merge queue Sep 26, 2024
Merged via the queue into osbuild:main with commit 031df2b Sep 26, 2024
9 of 10 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.

2 participants