]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts: use '/usr/bin/env' in shebangs with python
authorMartin Hundebøll <martin@hundeboll.net>
Thu, 30 Oct 2014 10:43:24 +0000 (11:43 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 31 Dec 2014 10:17:18 +0000 (10:17 +0000)
To support yocto on systems with python3 as default version, scripts
should use /usr/bin/env python in the shebang, as this allows the use of
a fake env to mimic python2 as default version.

This patch simply replaces occurrences of #!/usr/bin/python with
 #!/usr/bin/env python and was done with this oneliner:

     git grep -lE '^#!/usr/bin/python' | xargs \
         sed -i 's|/usr/bin/python|/usr/bin/env python|'

(From OE-Core rev: 6d3de22a19657a413e01d7bb5fd74d16c00dc696)

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
15 files changed:
scripts/lib/wic/conf.py
scripts/lib/wic/creator.py
scripts/lib/wic/imager/baseimager.py
scripts/lib/wic/kickstart/__init__.py
scripts/lib/wic/kickstart/custom_commands/micboot.py
scripts/lib/wic/kickstart/custom_commands/micpartition.py
scripts/lib/wic/msger.py
scripts/lib/wic/plugin.py
scripts/lib/wic/pluginbase.py
scripts/lib/wic/utils/errors.py
scripts/lib/wic/utils/fs_related.py
scripts/lib/wic/utils/misc.py
scripts/lib/wic/utils/partitionedfs.py
scripts/lib/wic/utils/runner.py
scripts/pybootchartgui/pybootchartgui.py

index d5419f8e943ff95a5dac43f127b1198c50446d53..be34355ce4dfb1918110e737ca7be395f1efe82e 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2011 Intel, Inc.
 #
index a4b19ac6e05dc4d05d8c18957bf99a2291168d31..2219377b389746c39eda6b7d47c3d634ccf6ad93 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2011 Intel, Inc.
 #
index 5bcd2f7529b57d80f33486983bddfec9a39e79f8..e8305272a2aaf839bdc6aac988581aab0878799e 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2007 Red Hat  Inc.
 # Copyright (c) 2009, 2010, 2011 Intel, Inc.
index 4f5b778b5d0898d0031d9f7aaebbe7303240ec37..600098293aeff5a1f7756ba20381b8d054c10fd1 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2007 Red Hat, Inc.
 # Copyright (c) 2009, 2010, 2011 Intel, Inc.
index 66d1678aa74b04d8998177276fd3a098ced845da..d162142506c2768ffd6b7cc3cd8f1e6665f930cc 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2008, 2009, 2010 Intel, Inc.
 #
index 59a87fb486259cca3bb44074a6bb700c0d7deef0..43d04f12945c0c27f467ad656ca5206ffb84e050 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Marko Saukko <marko.saukko@cybercom.com>
 #
index 9afc85be93f68b0315e6948e82021bf0fd4fcc79..9f557e7b9a5f127cfbd6771fb4758e285cc66ac3 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 # vim: ai ts=4 sts=4 et sw=4
 #
 # Copyright (c) 2009, 2010, 2011 Intel, Inc.
index 61c5859bac085f393b7643e02fabe8c0c5f69692..41a80175ca0231f5384200ea434e712e5a49a23d 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2011 Intel, Inc.
 #
index b8b3a463540d12ffd1ff3be881e361706142ebbb..e3de9bacb80e76cb2a60cb1c8417ad66f275f003 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2011 Intel, Inc.
 #
index 86e230ac1970ea6b3114c6ca1121431831f7106b..9410311875a2235f0135b40615f269b048204cac 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2007 Red Hat, Inc.
 # Copyright (c) 2011 Intel, Inc.
index 79cc1d52a7156b4883b2eebce85db21f5a7a5015..ea9f85c60f954154e6d021e544353ad3b9dbd1f0 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2007, Red Hat, Inc.
 # Copyright (c) 2009, 2010, 2011 Intel, Inc.
index 194b88f6915d24efa5bece673ca8bf986f87dd85..6e5631660855b2910f628bc704e260b94f0629a4 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2010, 2011 Intel Inc.
 #
index 791f488cd69d02e990f20edc3975487f60cd6e2f..fb95cc790e0016a2ecf307841b9d9f48a1f04f13 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2009, 2010, 2011 Intel, Inc.
 # Copyright (c) 2007, 2008 Red Hat, Inc.
index e740dad25398a74860a9fa8974348d6796c0ea6d..2ae9f417c5f9f5d589a19e9092f3f56845893fd6 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python -tt
+#!/usr/bin/env python -tt
 #
 # Copyright (c) 2011 Intel, Inc.
 #
index 947ce103380358016611e939fe5fbf551c70d9cb..7ce1a5be40d77048356a9bf4428bdad450bff6da 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 #  This file is part of pybootchartgui.