Validator for the snap's icon appears to check the file before the snap is compiled

Bug #1647343 reported by TMiguelT
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

Running `snapcraft` with the `icon` field set to something inside the container (e.g. `share/icons/hicolor/48x48/apps/myapp.png`) results in the following validation error:
`Issues while validating snapcraft.yaml: Specified icon ./share/icons/hicolor/48x48/apps/myapp.png' does not exist`

This would suggest that the icon needs to be the relative path of the icon outside the container. However the docs seem to indicate that the icon path should be a path inside the container: https://github.com/snapcore/snapcraft/blob/master/docs/metadata.md#package-icon

In addition, running `snapcraft` with a filepath outside the container means it passes this initial validation check, but results in this error at the very end of the compilation stage:

[Errno 2] No such file or directory: './myapp/resources/appname.png' -> '/home/myuser/snap/build/dir/prime/meta/gui/icon./myapp/resources/myapp'

summary: - Validator for the snap's icon appears to check the file before
+ Validator for the snap's icon appears to check the file before the snap
+ is compiled
description: updated
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.