the desktop attribute from snapcraft.yaml ends up in snap.yaml

Bug #1656487 reported by Leo Arias
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Sergio Schvezov

Bug Description

I made a snapcraft.yaml with a desktop attribute in an app. After creating the snap, this attribute is copied to snap.yaml:

$ cat /snap/keepassxc/current/meta/snap.yaml
apps:
  keepassxc:
    command: command-keepassxc.wrapper
    desktop: share/applications/keepassxc.desktop <--- ****BUG****
    plugs:
    - unity7
    - opengl
    - gsettings
    - home
architectures:
- amd64
confinement: strict
description: |
  KeePassXC is an application for people with extremly high demands on secure
  personal data management. It has a light interface, is cross platform and
  published under the terms of the GNU General Public License.
grade: stable
name: keepassxc
summary: "community driven port of the windows application \u201CKeepass Password\
  \ Safe\u201D"
version: develop

That is wrong because the snap.yaml specification doesn't include a desktop attribute. It should be stripped during the creation of the snap.

Revision history for this message
Leo Arias (elopio) wrote :

Setting priority to low because it doesn't seem to affect the snap at all, it's just ignored.

Changed in snapcraft:
importance: Undecided → Low
tags: added: snap-desktop-issue
Changed in snapcraft:
status: New → In Progress
assignee: nobody → Sergio Schvezov (sergiusens)
milestone: none → 2.26
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: In Progress → Fix Committed
Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for spotting the issue Leo, and thanks Sergio for fixing it!
It doesn’t affect the snap itself (the key is ignored indeed), however the store review tools raise a warning that prevents publication:

unknown fields for app 'webbrowser-app': 'desktop' lint-snap-v2_apps_unknown (webbrowser-app)

Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1656487] the desktop attribute from snapcraft.yaml ends up in snap.yaml

On Thu, 19 Jan 2017 13:40:36 +0000, Olivier Tilloy wrote:
> Thanks for spotting the issue Leo, and thanks Sergio for fixing it!
> It doesn’t affect the snap itself (the key is ignored indeed),
> however the store review tools raise a warning that prevents
> publication:
>
> unknown fields for app 'webbrowser-app': 'desktop' lint-snap-
> v2_apps_unknown (webbrowser-app)

Can you try building with master and check if everything is still good just in case?

--
Sent using Dekko from my Ubuntu device

Revision history for this message
Olivier Tilloy (osomon) wrote :

Confirmed: I built the webbrowser-app snap with snapcraft master, and the resulting snap doesn't have the desktop key in meta/snap.yaml, but the desktop file is correctly copied to meta/gui/.

Revision history for this message
Leo Arias (elopio) wrote :

Thanks for the info about the reviewer tools, osomon. I've raised the priority accordingly.

Changed in snapcraft:
importance: Low → High
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Ideally we'd do a quick release of 2.26 of 2.25.1 for this fix. When is the release planned?

Revision history for this message
Leo Arias (elopio) wrote :

Jamie, we are finishing the last details for the release. It will go out early next week.
Do you think we should make a release only with this fix?

Personally, I think it's not that critical because the workaround is to just keep using the previous way to define a desktop file for one more week, but your opinion will be appreciated.

Changed in snapcraft:
status: Fix Committed → Fix Released
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.