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

repo: While cloning root metadata copy also metalink #1880

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

m-blaha
Copy link
Member

@m-blaha m-blaha commented Nov 20, 2024

Although metalink.xml is located out of repodata directory, it should be
cloned with repository metadata.
Without correct metalink.xml for example doesn't work package remote
location resolving (because mirrors stored in metalink.xml are unknown).

@kontura
Copy link
Contributor

kontura commented Nov 20, 2024

I think this could solve: https://bugzilla.redhat.com/show_bug.cgi?id=2299337

@m-blaha
Copy link
Member Author

m-blaha commented Nov 21, 2024

Yes, I believe so.

@m-blaha
Copy link
Member Author

m-blaha commented Nov 21, 2024

I need to check the failing CI test.

@m-blaha m-blaha force-pushed the mblaha/clone-metalink branch from 361ec38 to e2499cc Compare November 21, 2024 08:05
@m-blaha
Copy link
Member Author

m-blaha commented Nov 21, 2024

The problem was that the PR tried to copy even non-existing metalink file resulting in std::filesystem::copy throwing an error and the whole clone_root_metadata failed. Fixed.

Copy link
Contributor

@kontura kontura left a comment

Choose a reason for hiding this comment

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

Should the mirrorlist be handled in the same way?

I have created a couple CI tests for this rpm-software-management/ci-dnf-stack#1597.

@m-blaha
Copy link
Member Author

m-blaha commented Nov 21, 2024

I'll take a look on the mirror lists.

Thinking about it, this PR is kind of a workaround. We should make sure that remote locations work even without metalink / mirrorlist files. The thing currently is, that repository mirrors are updated during RepoDownloader::load_local() execution, which runs (as the name suggests) with h.set_opt(LRO_LOCAL, 1L);. Thus no metalinks are downloaded from the remote repo and the code relies on the local copy. But this is out of scope of this simple PR.

Although metalink.xml and mirrorlist are located out of repodata
directory, they should be cloned with repository metadata. Without
them for example doesn't work packages remote location resolving.
@m-blaha m-blaha force-pushed the mblaha/clone-metalink branch from e2499cc to e66a12f Compare November 21, 2024 11:17
@m-blaha
Copy link
Member Author

m-blaha commented Nov 21, 2024

I've added also mirrorlist copying during the clone_root_metadata.

Copy link
Contributor

@kontura kontura left a comment

Choose a reason for hiding this comment

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

Thanks!

@kontura kontura added this pull request to the merge queue Nov 21, 2024
Merged via the queue into main with commit fdd7b2f Nov 21, 2024
18 of 20 checks passed
@kontura kontura deleted the mblaha/clone-metalink branch November 21, 2024 12:17
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