node plugin fails to capture symlink

Bug #1702661 reported by Evan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Sergio Schvezov

Bug Description

Given https://github.com/heroku/cli/blob/bb510a5ab5c970c8e911d3741849d1c41aa30945/snap/snapcraft.yaml

$ snapcraft
Preparing to pull hello-node-snap
Pulling hello-node-snap
Downloading 'node-v8.1.3-linux-x64.tar.gz'[===========================================================================================================================================================] 100%
npm --cache-min=Infinity install --global heroku-cli
/branches/cli/parts/hello-node-snap/install/bin/heroku -> /branches/cli/parts/hello-node-snap/install/lib/node_modules/heroku-cli/bin/run
+ heroku-cli@6.12.4
added 377 packages in 25.841s
npm --cache-min=Infinity install
npm WARN prefer global node-gyp@3.6.2 should be installed with -g
npm WARN prefer global foreman@2.0.0 should be installed with -g
npm notice created a lockfile as package-lock.json. You should commit this file.
added 376 packages in 21.984s
npm --cache-min=Infinity install --global
/branches/cli/parts/hello-node-snap/install/bin/heroku -> /branches/cli/parts/hello-node-snap/install/lib/node_modules/heroku-cli/bin/run
+ heroku-cli@6.12.4
updated 1 package in 7.355s
Preparing to build hello-node-snap
Building hello-node-snap
npm --cache-min=Infinity install --global heroku-cli
/branches/cli/parts/hello-node-snap/install/bin/heroku -> /branches/cli/parts/hello-node-snap/install/lib/node_modules/heroku-cli/bin/run
+ heroku-cli@6.12.4
updated 1 package in 5.395s
npm --cache-min=Infinity install
up to date in 4.045s
npm --cache-min=Infinity install --global
/branches/cli/parts/hello-node-snap/install/bin/heroku -> /branches/cli/parts/hello-node-snap/install/lib/node_modules/heroku-cli/bin/run
+ heroku-cli@6.12.4
updated 1 package in 6.208s
Staging hello-node-snap
Priming hello-node-snap
[Errno 2] No such file or directory: '/branches/cli/prime/bin/heroku'

Digging:

$ ls prime/bin/heroku -la
lrwxrwxrwx 1 ev dialout 38 Jul 6 05:16 prime/bin/heroku -> ../lib/node_modules/heroku-cli/bin/run

$ ls -la prime/lib/node_modules/heroku-cli
lrwxrwxrwx 1 ev dialout 14 Jul 6 05:16 prime/lib/node_modules/heroku-cli -> ../../../build

$ ls -la parts/hello-node-snap/install/bin/heroku
lrwxrwxrwx 1 ev dialout 38 Jul 6 05:16 parts/hello-node-snap/install/bin/heroku -> ../lib/node_modules/heroku-cli/bin/run

$ ls -la parts/hello-node-snap/install/lib/node_modules/heroku-cli
lrwxrwxrwx 1 ev dialout 14 Jul 6 05:16 parts/hello-node-snap/install/lib/node_modules/heroku-cli -> ../../../build

$ ls -la parts/hello-node-snap/build/bin/run
-rwxrwxr-x 1 ev dialout 537 Jul 6 03:31 parts/hello-node-snap/build/bin/run

Evan (ev)
summary: - node plugin fails to capture hardlink
+ node plugin fails to capture symlink
Revision history for this message
Evan (ev) wrote :

This only happens when you specify `node-engine: 8.1.3` with *any* install-from-npm snap. Dropping it resolves the issue.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I might be missing something but on snapcraft

$ snap info snapcraft
name: snapcraft
summary: "easily create snaps"
publisher: canonical
contact: <email address hidden>
description: |
  Snapcraft aims to make upstream developers' lives easier and as such is not a
  single toolset, but instead is a collection of tools that enable the natural
  workflow of an upstream to be extended with a simple release step into Snappy
  enabled system.
commands:
  - snapcraft
tracking: edge
installed: 2.32+git11.4f891d4 (306) 53MB classic
refreshed: 2017-07-05 11:11:24 -0300 -03
channels:
  stable: –
  candidate: 2.32 (274) 53MB classic
  beta: 2.32 (274) 53MB classic
  edge: 2.32+git11.4f891d4 (306) 53MB classic

I get this: http://paste.ubuntu.com/25040849/

Revision history for this message
Evan (ev) wrote :

I'm using the same revision and still getting the error:

https://gist.github.com/evandandrea/563099335c99d5cdc177ebc26f3268fc

Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Sergio Schvezov (sergiusens)
milestone: none → 2.33
Changed in snapcraft:
status: In Progress → Fix Committed
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.