My current project is a GTK Python application targeting the newly released Gnome SDK 47. I’ve generated the project files using the Gnome Builder application and it runs and builds fine via the IDE. As Gnome Builder is somewhat limited, I’m using PyCharm and building in the terminal. Previously I could do so, using the Gnome SDK 46. However, updating the SDK version in the manifest causes the following issue:
$ flatpak-builder --force-clean --user --repo=repo builddir org.bswa.Gnome47Test.json
Emptying app dir 'builddir'
Downloading sources
Fetching full git repo file:///home/jr/Code/gnome_47_test
Starting build of org.bswa.Gnome47Test
Cache hit for gnome_47_test, skipping build
Cache miss, checking out last cache hit
Cleaning up
Running appstream-compose
bwrap: execvp appstream-compose: No such file or directory
Error: ERROR: appstream-compose failed: Child process exited with code 1
I’ve installed the appropriate packages in Linux Mint and can run appstream-compose from the command line. Obviously Gnome Builder can run it, and could before I installed the packages.
Thanks for the tip! I’ve added the flatpak ppa and installed flatpak-builder 1.4.4
I now have the following error:
$ flatpak-builder --force-clean --user builddir org.bswa.Gnome47Test.json
Emptying app dir 'builddir'
Downloading sources
Fetching full git repo file:///home/jr/Code/gnome_47_test
Starting build of org.bswa.Gnome47Test
Cache hit for gnome_47_test, skipping build
Cache miss, checking out last cache hit
Cleaning up
Renaming org.bswa.Gnome47Test.appdata.xml to share/metainfo/org.bswa.Gnome47Test.metainfo.xml
Running appstreamcli compose
Only accepting components: org.bswa.Gnome47Test, org.bswa.Gnome47Test.desktop
Processing directory: /home/jr/Code/gnome_47_test/.flatpak-builder/rofiles/rofiles-CMwPv0/files
Composing metadata...
Run failed, some data was ignored.
Errors were raised during this compose run:
org.bswa.Gnome47Test.desktop
E: metainfo-no-summary
Refer to the generated issue report data for details on the individual problems.
Error: ERROR: appstreamcli compose failed: Child process exited with code 1
I cannot find the metainfo-no-summary error on this page:
$ flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream data/org.bswa.Gnome47Test.appdata.xml.in
E: org.bswa.Gnome47Test.desktop:~: component-name-missing
The component is missing a name (<name/> tag).
E: org.bswa.Gnome47Test.desktop:~: component-summary-missing
The component is missing a summary (<summary/> tag).
I: org.bswa.Gnome47Test.desktop:7: description-first-para-too-short No description
The first `description/p` paragraph of this component might be too short (< 80 characters).
Please consider starting with a longer paragraph to improve how the description looks like in
software centers and to provide more detailed information on this component immediately in the
first paragraph.
W: org.bswa.Gnome47Test.desktop:~: url-homepage-missing
This component is missing an `url` element of type `homepage` to link to the project's homepage.
E: org.bswa.Gnome47Test.desktop:~: desktop-app-launchable-omitted
This `desktop-application` component has no `desktop-id` launchable tag, however it contains all
the necessary information to display the application. The omission of the launchable entry means
that this application can not be launched directly from installers or software centers. If this
is intended, this information can be ignored, otherwise it is strongly recommended to add a
launchable tag as well.
E: org.bswa.Gnome47Test.desktop:~: releases-info-missing
This component is missing information about releases. Consider adding a `releases` tag to
describe releases and their changes.
E: org.bswa.Gnome47Test.desktop:~: content-rating-missing
This component has no `content_rating` tag to provide age rating information. You can generate
the tag data online by answering a few questions at https://hughsie.github.io/oars/
I: org.bswa.Gnome47Test.desktop:~: developer-info-missing
This component contains no `developer` element with information about its author.
✘ Validation failed: errors: 5, warnings: 1, infos: 2, pedantic: 1
The source for this project is entirely generated by Gnome Builder, with only the runtime version changed in the manifest. I’ve put the project up on GitHub:
Maybe take a quick glance at the readme I created.
I do wonder though, how much of this I really need. meson, ninja, appstream and so on and so forth.
The goal I have in mind is to create a GTK front end to an existing python project. I had some success without flatpak, but I’d like to use the more modern Adwaita features available in the new runtime.
The alternative is to roll my own flatpak project structure, but I’m not sure how difficult that would be.
I edited the desktop file, changing categories to “Development”
It still didn’t work… but ohhhhh…
I hadn’t realised that even though the files are stored locally, flatpak is pulling those changes via the local git repository. So I’ve been making all these changes, but not committing them. No wonder I’ve been struggling so much. Just putting the repo online gave me the answer.