/usr/share/python/runtime.d/pycentral.rtremove is in python-central 0.6.17ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #! /bin/sh -e
cmd="$1"
runtime="$2"
if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
pycentral rtremove $runtime
else
flist=$(tempfile)
for pcdir in /usr/share/pycentral/*; do
pkg=$(basename $pcdir)
find /usr/share/pycentral/$pkg -depth -mindepth 2 \
\( -name '*.py' -printf 'p %P\n' -o -printf '%y %P\n' \) \
> $flist 2>&1 || true
if [ -s $flist ]; then
d=/usr/lib/$runtime
while read t n; do
case "$t" in
p) rm -f $d/$n $d/${n}[co];;
d) rmdir --ignore-fail-on-non-empty $d/$n 2>/dev/null;;
*) rm -f $d/$n
esac
done < $flist
fi
rm -f $flist
done
find /usr/share/pyshared -depth -mindepth 1 \
\( -name '*.py' -printf 'p %P\n' -o -printf '%y %P\n' \) \
> $flist 2>&1 || true
if [ -s $flist ]; then
for d in /usr/lib/$runtime/????-packages; do
while read t n; do
case "$t" in
p) rm -f $d/$n $d/${n}[co];;
d) rmdir --ignore-fail-on-non-empty $d/$n 2>/dev/null;;
*) rm -f $d/$n
esac
done < $flist
done
fi
rm -f $flist
fi
|