Skip to content

Return "calculated" checksum if requested w/caching#234

Merged
m-blaha merged 1 commit intorpm-software-management:masterfrom
malmond77:cached_calculated_checksum
Mar 17, 2021
Merged

Return "calculated" checksum if requested w/caching#234
m-blaha merged 1 commit intorpm-software-management:masterfrom
malmond77:cached_calculated_checksum

Conversation

@malmond77
Copy link
Copy Markdown
Contributor

If a file is downloaded via librepo (e.g. dnf install --downloadonly)
then a request to get the checksum via lr_checksum_fd_compare() will
not work. It'll only return whether the checksum is valid, and not the
actual checksum. This is the simple fix.

Addresses #233

Comment thread librepo/checksum.c Outdated
Comment thread tests/test_checksum.c Outdated
@malmond77 malmond77 force-pushed the cached_calculated_checksum branch from 2743583 to d8d0236 Compare March 15, 2021 17:06
@malmond77 malmond77 requested a review from m-blaha March 16, 2021 18:44
@m-blaha
Copy link
Copy Markdown
Member

m-blaha commented Mar 17, 2021

Please, can you also bump the Version: field in librepo.spec to be in sync with VERSION.cmake? We are using this spec file to build our nightlies.
Other then this the PR is ready to be merged. Thanks for your work!

If a file is downloaded via librepo (e.g. `dnf install --downloadonly`)
then a request to get the checksum via `lr_checksum_fd_compare()` will
not work. It'll only return whether the checksum is valid, and not the
actual checksum. This is the simple fix.

Addresses rpm-software-management#233
@malmond77 malmond77 force-pushed the cached_calculated_checksum branch from d8d0236 to 8061564 Compare March 17, 2021 07:14
@m-blaha
Copy link
Copy Markdown
Member

m-blaha commented Mar 17, 2021

Thanks! I'll wait for tests to finish and merge it.

@m-blaha m-blaha merged commit ddee517 into rpm-software-management:master Mar 17, 2021
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