User friendly error missing when using go's source entry incorrectly

Bug #1499240 reported by Daniel Holbach
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Sergio Schvezov

Bug Description

daniel@daydream:~/dev/apps/bwm-ng.snap$ cat snapcraft.yaml
name: bwm-ng
version: 0.6-3.2
vendor: Daniel Holbach <email address hidden>
summary: small and simple console-based bandwidth monitor
description:
 Bandwidth Monitor NG is a small and simple console-based live network and
 disk io bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others
icon: ubuntu.png
binaries:
  bwm-ng:
    exec: usr/bin/bwm-ng

parts:
  bwm-ng:
    type: go
    source: .
    stage-packages: [bwm-ng]
daniel@daydream:~/dev/apps/bwm-ng.snap$ ls
image parts snapcraft.yaml ubuntu.png
daniel@daydream:~/dev/apps/bwm-ng.snap$ snapcraft
Skipping pull bwm-ng (already ran)
Skipping build bwm-ng (already ran)
Skipping stage bwm-ng (already ran)
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 80, in main
    args.func(args)
  File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 99, in assemble
    snap(args)
  File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 81, in snap
    cmd(args)
  File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 325, in cmd
    shutil.rmtree(common.get_snapdir())
  File "/usr/lib/python3.4/shutil.py", line 459, in rmtree
    onerror(os.lstat, path, sys.exc_info())
  File "/usr/lib/python3.4/shutil.py", line 457, in rmtree
    orig_st = os.lstat(path)
FileNotFoundError: [Errno 2] No such file or directory: '/home/daniel/dev/apps/bwm-ng.snap/snap'
daniel@daydream:~/dev/apps/bwm-ng.snap$

Changed in snapcraft:
milestone: none → 0.4
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Is this bug still valid? I can reproduce a different bug when using plugin go and source . (if '.' has nothing of the kind expected in a go project')

Changed in snapcraft:
status: New → Incomplete
Revision history for this message
Daniel Holbach (dholbach) wrote :

Yep, I see the same issue as you.

Changed in snapcraft:
assignee: nobody → Sergio Schvezov (sergiusens)
importance: Undecided → Medium
status: Incomplete → Confirmed
summary: - No such file or directory: './snap'
+ User friendly error missing when using go's source entry incorrectly
Changed in snapcraft:
milestone: 0.4 → none
Revision history for this message
Leo Arias (elopio) wrote :
Changed in snapcraft:
status: Confirmed → Invalid
Changed in snapcraft:
status: Invalid → Triaged
Changed in snapcraft:
status: Triaged → Fix Committed
Changed in snapcraft:
milestone: none → 0.5
Revision history for this message
Leo Arias (elopio) wrote :

The 0.5 release comes with a lot of changes to handle go sources.
As discussed in #1515132, the plugin now supports a local source, so the situation in this report should be a lot different now.

@daniel, if you are still experimenting issues with the go plugin using the latest snapcraft, please let us know.

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.