summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-10-13 08:49:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-10-13 08:53:48 +0000
commit5f2e6312efc1089d6ecdd5e8ff60c3711772736d (patch)
treeb6c725a47099aa5ded7d3dfbad8aff9768eca3e3
parentRenabling freeipmi plugin as #935764 is fixed. (diff)
downloadnetdata-5f2e6312efc1089d6ecdd5e8ff60c3711772736d.tar.xz
netdata-5f2e6312efc1089d6ecdd5e8ff60c3711772736d.zip
Refreshing use-python3.patch.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/patches/debian/0003-use-python3.patch20
1 files changed, 17 insertions, 3 deletions
diff --git a/debian/patches/debian/0003-use-python3.patch b/debian/patches/debian/0003-use-python3.patch
index e00391af..e5508927 100644
--- a/debian/patches/debian/0003-use-python3.patch
+++ b/debian/patches/debian/0003-use-python3.patch
@@ -4,11 +4,25 @@ Description: Debian uses by default python 2 instead of python3.
diff -Naurp netdata.orig/collectors/python.d.plugin/python.d.plugin.in netdata/collectors/python.d.plugin/python.d.plugin.in
--- netdata.orig/collectors/python.d.plugin/python.d.plugin.in
+++ netdata/collectors/python.d.plugin/python.d.plugin.in
-@@ -1,7 +1,4 @@
+@@ -1,21 +1,4 @@
-#!/usr/bin/env bash
-'''':;
--exec "$(command -v python || command -v python3 || command -v python2 ||
--echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM")" "$0" "$@" # '''
+-pybinary=$(which python || which python3 || which python2)
+-filtered=()
+-for arg in "$@"
+-do
+- case $arg in
+- -p*) pybinary=${arg:2}
+- shift 1 ;;
+- *) filtered+=("$arg") ;;
+- esac
+-done
+-if [ "$pybinary" = "" ]
+-then
+- echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM"
+- exit 1
+-fi
+-exec "$pybinary" "$0" "${filtered[@]}" # '''
+#!/usr/bin/python3
# -*- coding: utf-8 -*-