Re: Any way to restore or fast reinstall an installed flatpak?

On Thu, Apr 5, 2018 at 4:08 PM, Alexander Larsson <alexl redhat com> wrote:
On Thu, Apr 5, 2018 at 3:03 PM, Robin Lee <robinlee sysu gmail com> wrote:
$ ostree fsck --repo=$HOME/.local/share/flatpak/repo --delete
Validating refs...
Enumerating objects...
Verifying content integrity of 16 commit objects...

fsck objects (48647/72169) [========     ]  67%fsck content object
Corrupted file object; checksum
fsck objects (72169/72169) [=============] 100%
6 partial commits not verified
error: Repository corruption encountered

After running this, runtime reinstall will fail:

$ flatpak --user install  flathub org.freedesktop.Sdk/x86_64/1.6
Installing for user: org.freedesktop.Sdk/x86_64/1.6 from flathub
[####################] 1 metadata, 0 content objects fetched; 569 B
transferred in 6 seconds
error: While trying to checkout
07b0e89b0f6c4f72bbeb101f89d5c16ffab2a1f3d2e317b5ecc2adf8ead585ba into
Couldn't find file object

So the file is still not recovered.

Hmm, this is the object that was corrupt and deleted above, so its not
unexpected that it is not ther. But I'm not sure why it was not pulled
when you reinstalled...

o> By the way, shall flatpak prevents apps from modifying files under /etc?

For technical reasons /etc is a tmpfs, so you can write to it but all
the files from the runtime that are in there are not writable.

Actually i know why this is happening. When we pull the new commit as
long as there is a commit or a directory locally available in the repo
it assumes all the objects it references are there.

Can you try to create an empty file called

And then:

flatpak --user install --reinstall flathub org.freedesktop.Sdk/x86_64/1.6

Colin: Maybe we should add a flag to ostree pull that assumes all
commits are partial, for this kind of "repo repair" operations? I.e.
to repair a repo we could do ostree fsck --delete, and then re-pull
all refs with this flag.

 Alexander Larsson                                Red Hat, Inc
       alexl redhat com         alexander larsson gmail com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]