jjb: lttng-tools: sles15sp4 doesn't have python2
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 27 Mar 2023 21:35:47 +0000 (17:35 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Mon, 27 Mar 2023 21:41:55 +0000 (17:41 -0400)
Change-Id: Iace681136f0c3dc152a7d07dc1d459dd3d5a0dd4
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
scripts/lttng-tools/build.sh

index 3b0eb9d6485a250aa8c4949be33a840eed0e1108..04766951549a5362a154c2a1f52e48c6afc9e25f 100755 (executable)
@@ -353,12 +353,19 @@ agents)
     export JAVA_HOME="/usr/lib/jvm/default-java"
     export CLASSPATH="$DEPS_JAVA/lttng-ust-agent-all.jar:/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-1.2.jar"
 
-    CONF_OPTS+=("--enable-test-java-agent-all" "--enable-test-python-agent-all")
+    CONF_OPTS+=("--enable-test-java-agent-all")
 
     # Explicitly add '--enable-test-java-agent-log4j2', it's not part of '-all' in stable 2.12/2.13
     if verlt "$PACKAGE_VERSION" "2.14"; then
         CONF_OPTS+=("--enable-test-java-agent-log4j2")
     fi
+
+    # Some distros don't ship python2 anymore
+    if command -v $PYTHON2 >/dev/null 2>&1; then
+        CONF_OPTS+=("--enable-test-python-agent-all")
+    else
+        CONF_OPTS+=("--enable-test-python3-agent")
+    fi
     ;;
 
 relayd-only)
This page took 0.028618 seconds and 4 git commands to generate.