[opensuse-programming] Need help with #!/usr/bin//python
Hi, I have a problem with python scripts built in package bacula-3.0.3 the header in the script comes out with a double "//" in "#!/usr/bin//python" can anybody tell me where I can patch this error, the header in the .in file is "#!@PYTHON@" Thanks Dave P -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
Hi Dave, On Sat, 05 Dec 2009, 12:26:28 +0100, Dave Plater wrote:
Hi, I have a problem with python scripts built in package bacula-3.0.3 the header in the script comes out with a double "//" in "#!/usr/bin//python" can anybody tell me where I can patch this error, the header in the .in file is "#!@PYTHON@"
Could it be you've configured the packages using "--prefix=/usr/bin/"? Note the trailing slash!
Thanks Dave P
Cheers. l8er manfred -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
On 12/05/2009 04:21 PM, Manfred Hollstein wrote:
Hi Dave,
On Sat, 05 Dec 2009, 12:26:28 +0100, Dave Plater wrote:
Hi, I have a problem with python scripts built in package bacula-3.0.3 the header in the script comes out with a double "//" in "#!/usr/bin//python" can anybody tell me where I can patch this error, the header in the .in file is "#!@PYTHON@"
Could it be you've configured the packages using "--prefix=/usr/bin/"?
It uses "--prefix=%{_prefix}"
Note the trailing slash!
Thanks Dave P
Cheers.
l8er manfred
The only reference to python in the spec file before %configure is "export LDFLAGS="${LDFLAGS} -L/usr/{_libdir}/python%{pyver}"" I fixed the problem by patching the .in files replacing "#!@PYTHON@" with "#!/usr/bin/python". I hacked the spec file from the upstream packages spec file so I really don't know where the problem came from. Thanks Dave P -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
* Dave Plater (dplater@webafrica.org.za) [20091205 18:35]:
I fixed the problem by patching the .in files replacing "#!@PYTHON@" with "#!/usr/bin/python".
Why was the original a problem? Bash will happily accept a double slash in the path. Philipp -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
On 12/16/2009 06:13 PM, Philipp Thomas wrote:
* Dave Plater (dplater@webafrica.org.za) [20091205 18:35]:
I fixed the problem by patching the .in files replacing "#!@PYTHON@" with "#!/usr/bin/python".
Why was the original a problem? Bash will happily accept a double slash in the path.
Philipp
Build service and rpmbuild didn't except it so I made a patch to remove the // and all is well BTW it wasn't a bash script it was a python one. I'm still learning but all of the bash script .in files had #!/bin/bash as the header already, the python script .in files had "#!@PYTHON@" before compilation and they compiled with the //. I worked around this with a patch for the python py.in files to replace "#!@PYTHON@" with "#!/usr/bin/python" and it worked but I would really like to know where it went wrong. Thanks Dave P -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
participants (3)
-
Dave Plater
-
Manfred Hollstein
-
Philipp Thomas