Add usr/bin to the shebang replace path #238

Merged
merged 1 commit into from Jan 17, 2016

Conversation

Projects
None yet
3 participants
Collaborator

sergiusens commented Jan 15, 2016

LP: #1534812

Member

kyrofa commented Jan 15, 2016

👍 from me, though we may want to do this to all .debs in the future. Just waiting for the tools.

Member

kyrofa commented Jan 15, 2016

Ah right, the downside to doing it this way: It also needs to be done to the roscore plugin or the file contents differ.

Collaborator

sergiusens commented Jan 16, 2016

I am thinking of rebasing with #236

Member

kyrofa commented Jan 16, 2016

Does #236 look good? Feel free to merge and go ahead and rebase.

+ stage:
+ - -$dev
+ snap:
+ - -$dev
@elopio

elopio Jan 16, 2016

Member

This makes ROS an awesome example. Cool.

examples_tests/tests.py
@@ -178,6 +178,9 @@ class TestSnapcraftExamples(testscenarios.TestWithScenarios):
'dir': 'ros',
'name': 'ros-example',
'version': '1.0',
+ 'external_tests_commands': [
+ ("sed -n '/env/p;1q' snap/usr/bin/rosversion",
+ b'#!/usr/bin/env python\n',)],
@elopio

elopio Jan 16, 2016

Member

how clever this guy who invented the external test commands ;)
I would explain in a comment what that sed statement is doing there.

@sergiusens

sergiusens Jan 16, 2016

Collaborator

done

@@ -298,6 +308,14 @@ def _fix_filemode(path):
os.chmod(path, mode & 0o1777)
+def _fix_shebangs(path):
@elopio

elopio Jan 16, 2016

Member

It wouldn't hurt to comment why the shebangs have to be fixed. Just like on fix_symlinks above.

@sergiusens

sergiusens Jan 16, 2016

Collaborator

done

Member

elopio commented Jan 16, 2016

+1 from me. I'm just missing a couple of comments.

Collaborator

sergiusens commented Jan 16, 2016

@elopio I fixed the code to take into account your comments 😄

Collaborator

sergiusens commented Jan 16, 2016

@kyrofa done

sergiusens added a commit that referenced this pull request Jan 17, 2016

@sergiusens sergiusens merged commit 59a23a5 into snapcore:master Jan 17, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.3%) to 90.605%
Details

@sergiusens sergiusens deleted the sergiusens:bugfix/1534812/more-shebangs branch Jan 17, 2016

smoser pushed a commit to smoser/snapcraft that referenced this pull request Sep 14, 2016

Corrected extension version selection and stdout/stderr redirection
Corrects extension version selection (issue #238).
Corrects hanlding of stdout / stderr (issue #260).

Signed-off-by: Brendan Dixon <brendand@microsoft.com>

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment