-
Notifications
You must be signed in to change notification settings - Fork 236
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
Use #!/usr/bin/env perl instead of #!/usr/bin/perl to be able to use non standard perl in environment PATH. #51
Comments
I'm not sure whether either alternative is always better. Choosing Is there a way to fix up the shebang during installation so that lcov will always run with the perl it was installed under? E.g. I think Perl's EUMM is able to perform such rewriting (doc link, discussion), but it's use may be inappropriate in the context of lcov. A better solution might be to have the |
Hi, indeed I was not aware of this issue. I've came across it packaging lcov for anaconda, and since they use contained environments, perl is in a non standard location. I've patched lcov scripts for that package, and it's working. I'll consider patching the Makefile according to your suggestion. Thanks for the feedback! |
I can see the value of using I like the idea proposed by @latk. I could imagine the following set of patches:
[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shebang_lines |
Is anyone currently working on implementing this change? If yes, and there is a chance that this is finished by start of February, it could be included in the next LCOV release. |
Hi @oberpar , the solution you described above is not clear to me. The for the use case I need the location of the interpreter is located in the PATH, for which it cannot be determined at install time. The concrete use case is supporting lcov in anaconda environments. So the make install for this specific use-case would me some flag, e.g.:
That would replace the shebang line by |
I can see three different use cases that should be addressed:
This could be achieved as follows:
For the use-case you described, you would unset PERL_PATH during installation:
Note: BASH_PATH is not required as no installed script is using Bash. |
Hi, I need to use lcov in a non standard environment where perl interpreter is determined by the environment, and thus the current usage of #!/usr/bin/perl prevents it from working in such environment.
I've prepared a patch with the change, please confirm if it is reasonable and accepted.
Thanks.
The text was updated successfully, but these errors were encountered: