Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't generate metadata from GNUstep apps #60

Closed
tedge opened this issue Mar 19, 2018 · 1 comment
Closed

Can't generate metadata from GNUstep apps #60

tedge opened this issue Mar 19, 2018 · 1 comment

Comments

@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.

@tedge tedge changed the title Can't read metadata from GNUstep apps Can't generate metadata from GNUstep apps Mar 19, 2018
@ximion ximion closed this as completed Apr 16, 2018
@ximion
Copy link
Owner

ximion commented Apr 16, 2018

Icon login has been refined quite a bit in recent asgen releases, and you reported that removing the symlink fixed the issue on IRC, so I think it's safe to close the issue.
Unfortunately, due to technical reasons, we won't be able to deal with symlinked icons in asgen anytime soon (not without an incredible speed penalty to the whole data extraction process, which is not worth the tradeoff due to the very small number of packages that actually have symlinked icons or .desktop files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants