Andy
May 16, 2021, 9:46pm
1
Hello,
I am trying to build Gazebo.
But I get this error.
Processing application org.gazebosim.GazeboError loading desktop file: Failed to find icon: Failed to find icon org.gazebosim.GazeboError: ERROR: appstream-compose failed: Child process exited with code 1
I don’t understand why it cannot find icon. It is in app/share/icons/hicolor/
- install -Dm644 gazebo128.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/gazebo.png
- install -Dm644 gazebo256.png ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/gazebo.png
I submit a PR here: https://github.com/flathub/flathub/pull/2296
Full error log: Flathub builds
Thanks
hub
May 17, 2021, 12:04am
2
Since you have the icons and the desktop file in the repository and install them, I’d forego the rename-icon
, install them using the FLATPAK_ID as name and make sure the proper name is in the desktop file.
Andy
May 17, 2021, 1:23pm
3
Hi,
I install the icon to be name as flatpak_id and change icon name in desktop file as flatpak_id as well.
But still get stuck.
Processing application org.gazebosim.Gazebo
Error loading desktop file: Failed to find icon: Failed to find icon org.gazebosim.Gazebo
Error: ERROR: appstream-compose failed: Child process exited with code 1
Any idea?
Andy
May 19, 2021, 5:52am
4
I try remove all the comments, still same issue.
Don’t know what is going on anymore.
hub
May 20, 2021, 4:19pm
5
I am getting the same error locally and can’t figure it out.
Andy
May 20, 2021, 8:47pm
6
Thanks for the help.
I have a feeling that it could be a bug. But it is hard to pinpoint what, which is frustrating.
Andy
May 21, 2021, 5:53am
7
Turns out, there is an issue with appstream when directory is weird.
opened 11:50PM - 08 Nov 18 UTC
closed 12:57PM - 06 Feb 19 UTC
I have an appstream file, a desktop file and an icon used as exports in a flapka… k application. The appstream file references the desktop file. The desktop file uses the icon.
When `$prefix/usr` exists, `appstream-compose` requires the icon files to be in `$prefix/usr/share/icons` instead of `$prefix/share/icons`.
Flatpak is the use case I've encountered, but it's reproducible without it.
----
```sh
~/appstream-bug$ tree
.
├── share
│ ├── applications
│ │ └── org.example.TestIcon.desktop
│ ├── icons
│ │ └── hicolor
│ │ └── 256x256
│ │ └── apps
│ │ └── org.example.TestIcon.png
│ └── metainfo
│ └── org.example.TestIcon.appdata.xml
└── usr
~/appstream-bug$ appstream-compose --verbose --prefix=$(pwd) org.example.TestIcon
WARNING: Metadata origin not set, using 'example'
Processing application org.example.TestIcon
(appstream-compose:29789): As-DEBUG: Looking for /home/bak/appstream-bug/share/metainfo/org.example.TestIcon.appdata.xml
Error loading desktop file: Failed to find icon: Failed to find icon org.example.TestIcon
```
*org.example.TestIcon.desktop*:
```ini
[Desktop Entry]
Name=Test icon bug
Exec=/bin/sh
Icon=org.example.TestIcon
Type=Application
```
*org.example.TestIcon.appdata.xml*:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.example.TestIcon</id>
<metadata_license>CC-BY-SA-3.0</metadata_license>
<description>
</description>
<launchable type="desktop-id">org.example.TestIcon.desktop</launchable>
</component>
```