Fixing appstream-screenshots-not-mirrored-in-ostree error

I have managed to fix all the linting errors except appstream-screenshots-not-mirrored-in-ostree error.

This is the sources section of my manifest:

 "sources": [
  {
    "type": "dir",
    "path": "/path/to/my/dir",
  },
],

I’m asking this question here because I’ve read the docs and I’ve failed to understand what I’m supposed to do to fix that error. This is what the explanation says:

Exceptions allowed: No

The ostree ref is missing a screenshots/{arch} ref.
This error should not be reached on Flathub. Externally uploaded apps must ensure to mirror screenshots, commit the screenshot ref and upload the screenshot ref for all architectures.

Committing is done after Flatpak Builder exported a repo, using ostree commit --repo=<repo name> --canonical-permissions --branch=screenshots/<arch> <builddir>/files/share/app-info/media.

The process is automated when using flatpak-github-actions.

The explanation seems to suggest that Flatpak Builder does that behind the scenes. What should I do to fix that linting error?

I’m using the following linting command:

flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo repo

It doesn’t, you have to manually commit the screenshot ref using the ostree command above.

Are you submitting this to Flathub? Then you can skip this check as Flathub CI will do that for you like the docs say.

1 Like