New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildpkg is broken on linux #203

Closed
ineu opened this Issue Jul 17, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@ineu

ineu commented Jul 17, 2012

buildpkg script uses shebang #!/usr/bin/env emacs --script where emacs --script is treated as single argument on linux systems (tested on Arch). According to http://en.wikipedia.org/wiki/Shebang_(Unix):

Another portability problem is the interpretation of the command arguments. Some systems, including Linux, do not split up the arguments[14]; for example, when running the script with the first line like,

!/usr/bin/env python -c

That is, python -c will be passed as one argument to /usr/bin/env, rather than two arguments. Cygwin also behaves this way.

As a result:

ineu@ineu melpa % LANG= ./buildpkg
/usr/bin/env: emacs --script: No such file or directory

gvalkov added a commit to gvalkov/melpa that referenced this issue Jul 17, 2012

Fix portability problem with #!/usr/bin/env (issue melpa#203)
Passing the 'script' option to emacs doesn't work as expected
on Linux, since the shebang is evaluated as:
  #!/usr/bin/env "emacs --script"

@purcell purcell closed this in 3f149dc Jul 17, 2012

@ineu

This comment has been minimized.

ineu commented Jul 17, 2012

Thank you, it was fast. But doesn't this resolution conflict with #38?

@purcell

This comment has been minimized.

Member

purcell commented Jul 17, 2012

@ineu In what way?

@ineu

This comment has been minimized.

ineu commented Jul 17, 2012

@purcell, I mean this comment from @bbatsov: #38 (comment). If /bin/sh is ok for windows users, then it's fine.

@purcell

This comment has been minimized.

Member

purcell commented Jul 17, 2012

Ah, right. Yes, I think it should be fine: any user with a /usr/bin/env on his system should also have a /bin/sh.

-Steve

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