From 7c4c2c17492e783c898b2eb8147ff676da7057e0 Mon Sep 17 00:00:00 2001 From: Ara Pulido Date: Wed, 21 Feb 2024 11:10:32 +0100 Subject: [PATCH] Remove broken symlinks --- bin/compile | 4 ++++ extra/datadog.sh | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index baaf47a..2195908 100644 --- a/bin/compile +++ b/bin/compile @@ -258,6 +258,10 @@ if [ "$DD_PYTHON_VERSION" = "3" ]; then rm -f "$APT_DIR"/opt/datadog-agent/embedded/bin/pydoc* || true fi +# Remove broken symlinks +rm -f "$APT_DIR"/opt/datadog-agent/embedded/bin/2to3 || true +rm -f "$APT_DIR"/opt/datadog-agent/embedded/bin/pip || true +rm -f "$APT_DIR"/opt/datadog-agent/embedded/ssl/cert.pem || true # Rewrite package-config files find "$APT_DIR" -type f -ipath '*/pkgconfig/*.pc' | xargs --no-run-if-empty -n 1 sed -i -e 's!^prefix=\(.*\)$!prefix='"$APT_DIR"'\1!g' diff --git a/extra/datadog.sh b/extra/datadog.sh index 748bb6d..98a7591 100644 --- a/extra/datadog.sh +++ b/extra/datadog.sh @@ -153,7 +153,6 @@ if [ "$DD_PYTHON_VERSION" = "3" ]; then ln -sfn "$DD_DIR"/embedded/bin/python3 "$DD_DIR"/embedded/bin/python ln -sfn "$DD_DIR"/embedded/bin/python3-config "$DD_DIR"/embedded/bin/python-config ln -sfn "$DD_DIR"/embedded/bin/pip3 "$DD_DIR"/embedded/bin/pip - ln -sfn "$DD_DIR"/embedded/bin/pydoc3 "$DD_DIR"/embedded/bin/pydoc fi # Ensure all check and library locations are findable in the Python path.