Creating snap fails

asked 2019-06-11 12:13:12 -0500

tomalogix gravatar image

updated 2019-06-11 15:20:03 -0500

I am trying to create a snap from my ROS workspace based on the tutorial http://wiki.ros.org/ROS/Tutorials/Pac...

I have updated this- I believe I am farther but now snapcraft is crashing. I watched snapcraft work for a while grabbing things it needed- then crashed telling me my source: path was not a directory. It is indeed a directory and I have tried various keys and such but keep getting the same error. The output I get is below. When I 'view' the error, the last line tells me the path is not a directory. The source is located on my machine- I am not trying to get a git repo. I just want to build the snap from the workspace on my machine. Updated again- figured out how to get the yaml to display properly.......

Using 'snap/snapcraft.yaml': Project assets will be searched for from the 'snap' directory. Launching a VM. Using 'snap/snapcraft.yaml': Project assets will be searched for from the 'snap' directory. Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit http://packages.ros.org/ros/ubuntu bionic InRelease
Hit http://archive.ubuntu.com/ubuntu bionic InRelease
Hit http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 177 kB in 0s (0 B/s)
Pulling workspace Sorry, an error occurred in Snapcraft. We would appreciate it if you anonymously reported this issue. No other data than the traceback and the version of snapcraft in use will be sent. Would you like to send this error data? (Yes/No/Always/View) [no]: no

name: my-project
base: core18
version: '1.2'
summary:  My Software
description: |
  The Software

grade: devel
confinement: devmode

parts:
  workspace:
    plugin: catkin
    source: /path/to/catkin_ws
    source-space: src
    source-type: local
    catkin-packages: [my_package] 

apps:
  roscore:
    command: roscore
    plugs: [network, network-bind]

edit retag flag offensive close merge delete

Comments

The only immediate problem I see here is that your source should be relative. The snapcraft.yaml should be either in the root of your workspace or in a snap/ directory that is in the root of your workspace. Then your source should be source: .. No need to specify the source-space or source-type. Note also by using base: core18 you're using Melodic, I assume that is intended?

kyrofa gravatar image kyrofa  ( 2020-04-09 12:24:13 -0500 )edit