Switching a legacy snap to base use

Hi, i’m trying to update the timeline snap to use base core18 and gnome-3-28 extensions in order to get it working with user’s gtk-theme.

Here is my legacy span yaml : https://github.com/thetimelineproj/timeline_snap/blob/master/snap/snapcraft.yaml

And here is my updated snap using core18 : https://github.com/thetimelineproj/timeline_snap/blob/base/snap/snapcraft.yaml

When i build with snapcraft from ubuntu 16.04, i get this error :

Failed to generate snap metadata: The specified command 'desktop-launch' defined in the app 'timeline' does not exist.
Ensure that 'desktop-launch' is installed with the correct path.

FTR i’m logging this work in this issue https://github.com/thetimelineproj/timeline_snap/issues/2

Can someone tell me if i’m doing this update in the “state of the art” and give me some hints about the error generated by the build ? Thx in advance :slight_smile:

Snaps built with the new snapcraft don’t use remote parts, which I think desktop-launch is/used to be.

You’ll need to bundle desktop-launch in your snapcraft.yaml manually.

Thx @ijohnson(again ^^), so i think i have to do it like described here Snapcraft 3, core18, and Desktop Apps

I was thinking that base use will “simplify” the snap in order to finally get it working with gtk themes, maybe i’m wrong. Is it achievable more simply without using base ?

Remove desktop-launch from your command, the extension gives you that automatically.

Nice :slight_smile: I’ve removed that and now i got an error about python3 :

Failed to generate snap metadata: The specified command 'python3' defined in the app 'timeline' does not exist.
Ensure that 'python3' is installed with the correct path.

If i remove the python3 in the command i got :

Failed to generate snap metadata: The specified command '$SNAP/var/opt/timeline/source/timeline.py' defined in the app 'timeline' does not exist.
Ensure that '$SNAP/var/opt/timeline/source/timeline.py' is installed with the correct path.

I should have missed something in the way that base snaps commands works :\

I think you need to specify the path to where to find python3 in the command. Something like $SNAP/use/bin/python3

Great, i’ll try it, for now it seems to work with this command :

command: var/opt/timeline/source/timeline.py

Thx again !

Hopefully that resolved your theme issues as well, please let us know how it worked.

\o/ it works, i can close issue n°1 on this repo !

Thx again @ijohnson & @kenvandine