appstream/desktop file icon extraction missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
High
|
Claudio Matsuoka |
Bug Description
Currently the icon.{png,svg} is not being properly extracted via appstream/desktop file information.
The current code expects the appstream data to contain something like `<icon type="local"
As such the current icon support is largely useless :|
What needs to happen is the following:
- existing code to look for icon tag
- if no icon tag OR icon is not an absolute path OR absolute path doesn't exist in tree:
- find desktop file (this may be set via <launchable> or inferred from <id> as is already the case in appstream.py)
- get icon from desktop file
- if icon is absolute path
- use that
- else
- do an icon lookup [1] against the hicolor theme
- (ideally one would actually be able to specify an additional "master" theme which is checked before hicolor; hicolor is the generic fallback but not necessarily the ideal visuals to use from a branding POV)
NB: beware that theme icons may be png, xpm, svg, or svgz. Raising an error when an unsupported format is found is likely required (also unzipping svgz may be handy).
Implementing this would also allow extending the current support so it not only supports `<icon type="local">` but also `<icon type="stock">` which is depending on the icon lookup.
[1] https:/
Changed in snapcraft: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Sergio Schvezov (sergiusens) |
milestone: | none → 3.2 |
Changed in snapcraft: | |
milestone: | 3.2 → 3.3 |
Changed in snapcraft: | |
assignee: | Sergio Schvezov (sergiusens) → Claudio Matsuoka (cmatsuoka) |
tags: | added: 19.04 19.04-blue |
Changed in snapcraft: | |
status: | Triaged → In Progress |
Changed in snapcraft: | |
milestone: | 3.3 → 3.4 |
Changed in snapcraft: | |
status: | In Progress → Fix Committed |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
Could you provide a package to test/validate a fix proposal?