Skip to content

Conversation

@dcantrell
Copy link

If mkdir() fails and errno is EEXIST, that's ok. It means we already have the repodata/ directory. Just keep going. But any other errors get reported and the function fails.

Fixing this fixes the problem I've been seeing on my system ever since moving to dnf5, which is:

$ sudo dnf check-update
# ERROR: something about directory already existing
# argh..., so then do
$ sudo dnf clean all
$ sudo dnf check-update

Now I can just do 'sudo dnf check-update' and it works. I am seeing this on Fedora 42 right now, but I also saw it on previous releases.

If mkdir() fails and errno is EEXIST, that's ok.  It means we already
have the repodata/ directory.  Just keep going.  But any other errors
get reported and the function fails.

Fixing this fixes the problem I've been seeing on my system ever since
moving to dnf5, which is:

    $ sudo dnf check-update
    # ERROR: something about directory already existing
    # argh..., so then do
    $ sudo dnf clean all
    $ sudo dnf check-update

Now I can just do 'sudo dnf check-update' and it works.  I am seeing
this on Fedora 42 right now, but I also saw it on previous releases.

Signed-off-by: Dave Cantrell <[email protected]>
@dcantrell dcantrell requested a review from a team as a code owner November 12, 2025 15:19
@dcantrell dcantrell requested review from fhbash and removed request for a team November 12, 2025 15:19
Copy link
Contributor

@fhbash fhbash left a comment

Choose a reason for hiding this comment

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

LGTM

@kontura
Copy link
Contributor

kontura commented Dec 1, 2025

I also agree this is a fine change I am only curious if you could share some more details regarding the reproducer?

It doesn't happen to me using the steps you described and I would like understand how it can happen.
Do you have some specific dnf config? or repos?
Of course a CI test or a reproducer in a container would be ideal.

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.

3 participants