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

Check if repository metadata already exists (is cached) #1273

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

felixsch
Copy link
Contributor

Instead of re-downloading repomd metadata, check if the files are already exists in the "cache" (repository_path).

How to review:

$ git checkout master
$ bundle exec bin/rmt-cli repos enable 6301
$ bundle exec bin/rmt-cli mirror repository 6301
$ bundle exec bin/rmt-cli mirror repository 6301
# expect: See that the metadata is re-downloaded (↓ instead of →)

$ git checkout fix-non-cached-metadata
$ bundle exec bin/rmt-cli mirror repository 6301
# expect: See that the metadata is NOT re-downloaded (→ instead of ↓)

Note: Why is there no test for this? The logic of when to download what is in downloader.rb rather then repomd.rb. If you insist I add a test checking if cache_dir: is set? Needed?

Thank you for reviewing!

cheers,

Instead of re-downloading repomd metadata, check if the files are
already exists in the "cache" (repository_path).
Copy link
Contributor

@mssola mssola left a comment

Choose a reason for hiding this comment

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

Works as advertised 👍🏻

@mssola
Copy link
Contributor

mssola commented Jan 15, 2025

If you insist I add a test checking if cache_dir: is set? Needed

Not needed from my side.

@felixsch felixsch merged commit 3d4c451 into master Jan 15, 2025
3 checks passed
@felixsch felixsch deleted the fix-non-cached-metadata branch January 15, 2025 15:47
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