Skip to content

OCI appstream support sometimes leaves out icons #2835

Closed

Description

@kalev

When using gnome-software, OCI-based flatpaks sometimes lose their icons. The appstream xml in the appstream repo correctly refers to the icons, but the icons that should be in /var/lib/flatpak/appstream/fedora/x86_64/icons/ go missing.

Note that this doesn't happen always, but often enough that a bunch of people have noticed it.

I suspect this is due to cancellable handling in the OCI code that can leave the icons in an inconsistant state. gnome-software can sometimes cancel the cancellable and it seems that libflatpak doesn't correctly handle it in the OCI code.

Activity

  1. matthiasclasen commented on Apr 17, 2019

    @matthiasclasen
    Collaborator

    Looks like flatpak_dir_update_appstream_oci bails out early if the timestamp is up-to-date:

     timestamp_file = g_file_get_child (arch_dir, ".timestamp");
      if (check_destination_mtime (index_cache, timestamp_file, cancellable))
        return TRUE;
    

    despite the download of icons having possibly been interrupted by a cancellation, indeed.

  2. matthiasclasen commented on Apr 17, 2019

    @matthiasclasen
    Collaborator

    One way to fix this would be for flatpak_dir_update_appstream_oci to always check that it has all the used icons. But maybe it is easier to not consider the appstream pull successful if we get canceled.

  3. owtaylor commented on Apr 17, 2019

    @owtaylor
    Contributor

    One way to fix this would be for flatpak_dir_update_appstream_oci to always check that it has all the used icons. But maybe it is easier to not consider the appstream pull successful if we get canceled.

    The latter is my initial take here - that in is that in add_image_to_appstream() if add_icon_image() fails because the cancellable is cancelled, that should be propagated out and not ignored.

    This would leave a similar problem if the network dropped halfway through downloading a bunch of new icons - say - but I think that might be acceptable. Otherwise, we'd need to continually be checking for missing icons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions