No way to add desktop files at build time

Bug #1588359 reported by Michael Hall
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Wishlist
Olivier Tilloy

Bug Description

I would like my snap to copy the icon for it's .desktop file from a part's source into /setup/gui/ at build time, but there is currently no way to do this.

Michael Hall (mhall119)
description: updated
Revision history for this message
Ted Gould (ted) wrote :

I would like to copy the desktop file after it is build by the build system. It starts as a .in file and is merged with the translation .po files to create the final desktop. Then it needs to get copied to the location for Snapcraft after the build step.

tags: added: snap-desktop-issue
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This should be done by snapcraft

Changed in snapcraft:
status: New → Triaged
Revision history for this message
kevin gunn (kgunn72) wrote :

wrt icon lookup discussion at sprint, this was recommended reading
https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#icon_lookup

Changed in snapcraft (Ubuntu):
importance: Undecided → High
Revision history for this message
Lee Trager (ltrager) wrote :

Instead of copying the files out of the source path it would be nice if snapcraft allowed you to specify the path to the icon and license by part. For example if I have a part called foo which contains the icon and license in its source I should be able to do something like

icon: $foo/icon.png
license: $foo/COPYIING

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapcraft (Ubuntu):
status: New → Confirmed
Revision history for this message
Leo Arias (elopio) wrote :

I tried using a link: setup/gui/keepassxc.desktop -> share/linux/keepassxc.desktop
That didn't work:

[('setup/gui/icon.png', '/home/elopio/workspace/keepassxreboot/keepassxc/prime/meta/gui/icon.png', "[Errno 2] No such file or directory: 'setup/gui/icon.png'"), ('setup/gui/keepassxc.desktop', '/home/elopio/workspace/keepassxreboot/keepassxc/prime/meta/gui/keepassxc.desktop', "[Errno 2] No such file or directory: 'setup/gui/keepassxc.desktop'")]

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I am going to target this bug for desktop files specifically.

summary: - No way to add setup files at build time
+ No way to add desktop files at build time
no longer affects: snapcraft (Ubuntu)
Changed in snapcraft:
milestone: none → 2.23
milestone: 2.23 → none
Changed in snapcraft:
importance: Undecided → Wishlist
Revision history for this message
Olivier Tilloy (osomon) wrote :

Tentative implementation at https://github.com/snapcore/snapcraft/pull/1010, feedback welcome!

Changed in snapcraft:
assignee: nobody → Olivier Tilloy (osomon)
status: Triaged → In Progress
Changed in snapcraft:
status: In Progress → Fix Committed
milestone: none → next
Changed in snapcraft:
status: Fix Committed → Fix Released
Evan (ev)
tags: added: eco-team
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.