Comment 2 for bug 1516228

Revision history for this message
XiaoGuo, Liu (liu-xiao-guo) wrote :

Hi Sergio,

I just checked it, and the problem still existed. My test project is like:

name: go-webserver
vendor: XiaoGuo, Liu <email address hidden>
icon: go.png
version: 1.0.7
summary: Go webserver
description: This is a simple go webserver. It is a service

services:
  webserver:
    description: "Go websever"
    start: bin/golang-http
    caps:
     - network-client
     - network-service

parts:
  webserver:
    plugin: go
    source: github.com/liu-xiao-guo/golang-http

liuxg@liuxg:~/snappy/examples/go-webserver$ snapcraft
Traceback (most recent call last):
  File "/usr/bin/snapcraft", line 33, in <module>
    snapcraft.main.main()
  File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 147, in main
    args.func(args)
  File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 103, in assemble
    snap(args)
  File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 85, in snap
    cmd(args)
  File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 322, in cmd
    config = _load_config()
  File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 387, in _load_config
    _config = snapcraft.yaml.Config()
  File "/usr/lib/python3/dist-packages/snapcraft/yaml.py", line 139, in __init__
    self.load_plugin(part_name, plugin_name, properties)
  File "/usr/lib/python3/dist-packages/snapcraft/yaml.py", line 192, in load_plugin
    part_name, plugin_name, properties)
  File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 274, in load_plugin
    return PluginHandler(plugin_name, part_name, properties)
  File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 65, in __init__
    self._load_code(plugin_name, properties)
  File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 92, in _load_code
    self.code = plugin(self.name, options)
  File "/usr/lib/python3/dist-packages/snapcraft/plugins/go.py", line 56, in __init__
    self.fullname = self.options.source.split("://")[1]
IndexError: list index out of range
liuxg@liuxg:~/snappy/examples/go-webserver$ sudo apt-get install snapcraft
Reading package lists... Done
Building dependency tree
Reading state information... Done
snapcraft is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
liuxg@liuxg:~/snappy/examples/go-webserver$ dpkg-query -W snapcraft
snapcraft 0.4