@tedge
Copy link

tedge commented Mar 19, 2018

Ubuntu's AppStream issues list is generated by appstream-generator 0.6.6:
http://appstream.ubuntu.com/bionic/universe/issues/index.html

36 of the 37 GNUstep apps on the list (search for ".app") have errors, and 32 of those errors are 'gui-app-without-icon'.

Some examples:
http://appstream.ubuntu.com/bionic/universe/issues/gworkspace.app.html
http://appstream.ubuntu.com/bionic/universe/issues/helpviewer.app.html
http://appstream.ubuntu.com/bionic/universe/issues/lynkeos.app.html
http://appstream.ubuntu.com/bionic/universe/issues/mpdcon.app.html
http://appstream.ubuntu.com/bionic/universe/issues/pikopixel.app.html
(I'm the upstream developer of PikoPixel.app.)

TextEdit.app is the only GNUstep app that successfully generates metadata:
http://appstream.ubuntu.com/bionic/universe/metainfo/textedit.app.html

As a bit of background, GNUstep apps generally leave their icons within in the app's own directory instead of moving them to /usr/share/pixmaps/ or /usr/share/icons/:

PikoPixel.desktop's Icon entry:
Icon=/usr/lib/GNUstep/Applications/PikoPixel.app/Resources/GNUstepAppIcon.png

TextEdit.desktop's Icon entry:
Icon=/usr/share/GNUstep/TextEdit.app/accessories-text-editor_128x128x32.png

From a quick scan of the appstream-generator sources, it looks like the generator searches only the package contents for icon filepaths (without checking the .desktop file), and if no filepaths matching "/usr/share/icons/" or "/usr/share/pixmaps/" are found, it returns a 'gui-app-without-icon' error:

// filter out icon filenames and filenames of icon-related stuff (e.g. theme.index)
auto iconInfo = appender!(string[]);
foreach (ref c; contents) {
if ((c.startsWith ("/usr/share/icons/")) ||
(c.startsWith ("/usr/share/pixmaps/"))) {
iconInfo ~= c;
}
}

If this is what's causing the issue (though it doesn't explain why TextEdit.app is successfully parsed), my suggestion would be to also check the .desktop file for the icon filepath before returning the error.