Remote parts don't seem to work in snapcraft 3.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I've got a yaml which has after: [desktop-gtk2], and an apps stanza which has "desktop-launch foo". When building snapcraft errors with.
Failed to generate snap metadata: The specified command 'desktop-launch' defined in the app 'snes9x-gtk' does not exist or is not executable.
Ensure that 'desktop-launch' is relative to the prime directory.
I'm doing this inside multipass if that matters, and it's a core18 based snap.
name: snes9x
version: '1.56.2' # just for humans, typically '1.2+git' or '1.3.2'
summary: Super NES Emulator
description: |
Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES)
emulator. It basically allows you to play most games designed for the SNES
and Super Famicom Nintendo game systems on your PC or Workstation; they
include some real gems that were only ever released in Japan.
base: core18
grade: stable
confinement: strict
apps:
snes9x-gtk:
environment:
"
command: desktop-launch $SNAP/bin/
plugs:
- x11
- network
- network-bind
- joystick
- home
- pulseaudio
- removable-media
parts:
snes9x:
after: [desktop-gtk2]
source: https:/
plugin: autotools
source-tag: '1.56.2'
build-packages:
- libsdl1.2-dev
- libboost-thread-dev
- libboost-system-dev
- libsdl-ttf2.0-dev
- libasound2-dev
- zlib1g-dev
- libpng-dev
- xorg-dev
- libpulse-dev
- libx11-dev
- libxml2-dev
- portaudio19-dev
- intltool
- libgtk-3-dev
- libminizip-dev
- libsdl2-dev
stage-packages:
- pulseaudio-utils
- libpulse0
override-build: |
cd gtk
autoreconf --install
intltoolize --force
./configure
make
cp -a snes9x-gtk $SNAPCRAFT_
It's because you've set a `base:`. When you do so, snapcraft thinks you want the "new world order" which doesn't include remote parts. There are two solutions depending on requirements:
1. If the application works against libraries in xenial then remove `base: core18`.
2. Otherwise, you need to add the remote part definition into the `snapcraft.yaml`:
```yaml /github. com/ubuntu/ snapcraft- desktop- helpers. git parameters: ["FLAVOR=gtk2"] font-family standard
desktop-gtk2:
source: https:/
source-subdir: gtk
plugin: make
make-
build-packages:
- build-essential
- libgtk2.0-dev
stage-packages:
- libxkbcommon0 # XKB_CONFIG_ROOT
- ttf-ubuntu-
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-
- shared-mime-info
- libgtk2.0-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk2.0-bin
- unity-gtk2-module
- locales-all
- libappindicator1
- xdg-user-dirs
- ibus-gtk
- libibus-1.0-5
```