We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec6ee85 commit 59457bfCopy full SHA for 59457bf
linuxdeploy-plugin-python.sh
@@ -240,10 +240,14 @@ patch_binary() {
240
fi
241
else
242
echo "Patching C-extension module ${name}"
243
- local rel=$(dirname $(readlink -f $1))
+ local rpath="$(${patchelf} --print-rpath $1)"
244
+ local rel="$(dirname $(readlink -f $1))"
245
rel=${rel#${APPDIR}/usr}
246
rel=$(echo $rel | sed 's|/[_a-zA-Z0-9.-]*|/..|g')
- "${patchelf}" --set-rpath '$ORIGIN:$ORIGIN'"${rel}/lib" "$1"
247
+ if grep -qv '$ORIGIN'"${rel}/lib" <<< "${rpath}" ; then
248
+ [[ ! -z "${rpath}" ]] && rpath="${rpath}:"
249
+ "${patchelf}" --set-rpath "${rpath}"'$ORIGIN'"${rel}/lib" "$1"
250
+ fi
251
252
253
local deps
0 commit comments