diff options
Diffstat (limited to 'recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch')
-rw-r--r-- | recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch b/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch new file mode 100644 index 00000000..6091930e --- /dev/null +++ b/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 33769657e951da855b9258eb91fa9838373023ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Fri, 13 Jan 2017 16:12:55 -0500 | ||
4 | Subject: [PATCH] python: make remaining scripts use /usr/bin/env | ||
5 | |||
6 | Unfortunately there is no concept of a host python vs. target python | ||
7 | to facilitate cross compilation. There is only one PYTHON variable and | ||
8 | this is used during building and in the header of python scripts after | ||
9 | installation. The best approach for cross compilation is to thus to | ||
10 | ensure python is in the path and avoid passing a path as part of | ||
11 | PYTHON. To make this function smoothly all installed scripts should | ||
12 | make use of /usr/bin/env to increase the chances of finding python. | ||
13 | |||
14 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
15 | --- | ||
16 | ovsdb/ovsdb-dot.in | 2 +- | ||
17 | ovsdb/ovsdb-idlc.in | 2 +- | ||
18 | utilities/bugtool/ovs-bugtool.in | 2 +- | ||
19 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in | ||
22 | index 134ce22..893c408 100755 | ||
23 | --- a/ovsdb/ovsdb-dot.in | ||
24 | +++ b/ovsdb/ovsdb-dot.in | ||
25 | @@ -1,4 +1,4 @@ | ||
26 | -#! @PYTHON@ | ||
27 | +#! /usr/bin/env @PYTHON@ | ||
28 | |||
29 | from datetime import date | ||
30 | import ovs.db.error | ||
31 | diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in | ||
32 | index cd4532e..dceb02f 100755 | ||
33 | --- a/ovsdb/ovsdb-idlc.in | ||
34 | +++ b/ovsdb/ovsdb-idlc.in | ||
35 | @@ -1,4 +1,4 @@ | ||
36 | -#! @PYTHON@ | ||
37 | +#! /usr/bin/env @PYTHON@ | ||
38 | |||
39 | import getopt | ||
40 | import os | ||
41 | diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in | ||
42 | index bb771b0..152d171 100755 | ||
43 | --- a/utilities/bugtool/ovs-bugtool.in | ||
44 | +++ b/utilities/bugtool/ovs-bugtool.in | ||
45 | @@ -1,4 +1,4 @@ | ||
46 | -#! @PYTHON@ | ||
47 | +#! /usr/bin/env @PYTHON@ | ||
48 | |||
49 | # This library is free software; you can redistribute it and/or | ||
50 | # modify it under the terms of version 2.1 of the GNU Lesser General Public | ||
51 | -- | ||
52 | 2.7.4 | ||
53 | |||