Clifford Perry wrote:
Jan Pazdziora wrote:
On Wed, Jan 14, 2009 at 08:57:38AM -0400, Devan Goodwin wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Actually, this AVC denial is about different problem. So it was not
a good example.

But nevertheless: shouldn't we decide for env or direct path in the
shebang line and be consistent about it?
+1. I'd go the other direction though and stick with "/usr/bin/env
python", iirc that's considered best practice to accommodate people
with Python installed in a weird location or using multiple versions.

If you have Python in a weird location, you probably won't have
osa-dispatcher .py files installed in its PYTHONHOME, will you? So,
the first import which assumes that the python you run actually has
all the prerequisites installed, will fail. Alternatively, mixing
different pythons and libraries from different pythons might produce
weird results because symbols referenced in one library might not be
present in the library from that second python.

We actually have (non-public) bugzilla about this very problem. I'd
argue that we should stop pretending that /usr/bin/env python will
work in the general case, any just put /usr/bin/python there. If
someone needs to run it with different interpreter, they can always do

    python /the/path/to/the/script


I would prefer the hard code path to the python binary for reasons stated by Jan above.

Folks - other than preference normally - please give feedback based on this above information.

Cliff


I'd suggest /usr/bin/python without the env.

If the RPM doesn't work with the distribution-specific Python, things are quite busted, and folks shouldn't expect them to work.

We do not package two python versions, and the modules won't be properly installed as required by the RPM.

--Michael


_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to