Skip to content
Commit f809e9f9 authored by Phaedrus Leeds's avatar Phaedrus Leeds Committed by Alexander Larsson
Browse files

repair: Properly mark invalid commits as partial

Commits that are found to have missing or invalid objects need to be
marked partial so that when the thing referencing them is reinstalled,
the missing objects will be pulled. libostree treats non-partial commits
as complete even if they're not, since verifying their completeness is
an expensive operation.

This exactly mirrors what the "ostree fsck" command does when it finds
corruption in a commit.

This fix is especially important because corrupt repos have been an
issue lately so we at least need repair to work properly.

Relatedly, delete invalid commit objects to ensure they are
re-downloaded, though it's not clear that code path is almost ever
reachable.

Fixes https://github.com/flatpak/flatpak/issues/4618

(cherry picked from commit 6fac58a9b90c128a28d028f8f60531513ad1498e)
parent 8db0af3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment