[Mageia-dev] Minimal patching vs. fixing the whole Universe

Colin Guthrie mageia at colin.guthr.ie
Thu Jun 23 00:08:35 CEST 2011


'Twas brillig, and David W. Hodgins at 22/06/11 22:51 did gyre and gimble:
> On Wed, 22 Jun 2011 16:47:40 -0400, Radu-Cristian FOTESCU
> <beranger5ca at yahoo.ca> wrote:
> 
>> As long as '/usr/bin/env python' _works_, I see no point in trying to
>> rewrite other people's work.
> 
> Excluding the calibre scripts, in /usr/bin of a Mageia 1 kde clean
> installation ...
> # grep -I python *|grep '#!'|grep env
> ebook-convert:#!/usr/bin/env python
> ebook-device:#!/usr/bin/env python
> ebook-meta:#!/usr/bin/env python
> ebook-viewer:#!/usr/bin/env python
> epub-fix:#!/usr/bin/env python
> fetch-ebook-metadata:#!/usr/bin/env python
> gsettings-schema-convert:#!/usr/bin/env python
> jack_control:#!/usr/bin/env python
> lrf2lrs:#!/usr/bin/env python
> lrfviewer:#!/usr/bin/env python
> lrs2lrf:#!/usr/bin/env python
> markdown-calibre:#!/usr/bin/env python
> pdfmanipulate:#!/usr/bin/env python
> pykdeuic4:#!/usr/bin/env python
> pykdeuic4:header = """#!/usr/bin/env python
> web2disk:#!/usr/bin/env python
> 
> In general, I agree with you.  If it isn't broken, don't fix it.
> 
> However, in this case, the python2 had to be changed to python.
> 
> The environment is not being modified, so it is adding an unneeded process,
> which should be discouraged.
> 
> Since you have to change the line anyway, I have to agree with Ahmad, that
> it should be changed to #!/usr/bin/python.


I think it's relatively unimportant overall, but:

 1) /usr/bin/python should be marginally faster
 2) /usr/bin/python prevents you testing easily with a new python
version (or just a new build) in a custom prefix).

So 1) is a (very slight) pro for everyone, but 2) is a pretty big con
for developers playing with python builds.... of course in that case a
simple "sudo mv /usr/bin/python /usr/bin/python.orig; ln -s
/path/to/my/custom/build/of/python /usr/bin/python" should allow said
developer to test fine.

Col

-- 

Colin Guthrie
mageia(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


More information about the Mageia-dev mailing list