relm4-template icon indicating copy to clipboard operation
relm4-template copied to clipboard

The instructions don't work if the app id has a `-`

Open sgued opened this issue 2 years ago • 2 comments

Hi,

When trying to create an application with a dash in the name, the build instructions from the readme fail:

$ flatpak-builder --user flatpak_app build-aux/fr.sgued.ten-forward.Devel.json
Downloading sources
Initializing build dir
error: 'fr.sgued.ten-forward.Devel' is not a valid application name: Only last name segment can contain -

This issue can be fixed by having changing the Id inside of the .Devel.json manifest (the id itself, not the name of the file), to remove the Devel at the end. For example in my case the file would start:

{
    "id": "fr.sgued.Devel.ten-forward",
    "runtime": "org.gnome.Platform",
    "runtime-version": "44",

With the Devel moved so that the app name is at the end.

Are apps with a - in the id not supported? The example proposed by the script has one: my-awesome-app.

sgued avatar Oct 21 '23 19:10 sgued

I think dashes are not supported in app IDs. my-awesome-app refers to the project name, the second prompt which is used for the folder and executable names AFAIK.

I think the script should immediately report false inputs though, but this should rather be fixed upstream.

AaronErhardt avatar Oct 21 '23 21:10 AaronErhardt

Indeed, hyphens are not allowed.

https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic

While hyphens are allowed for legacy compatibility, their usage is strongly discouraged to ensure interoperability of the AppStream ID with other tools such as D-Bus (and thereby making the ID more generic and useful).

sgued avatar Nov 01 '23 11:11 sgued