aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/deb/meshbay-common/DEBIAN/preinst
blob: 16af2f8fde680aa9961a8dffe9d90056cddf72dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
set -e

# The postinst compiles bytecode next to every module, into __pycache__
# directories the package does not own. Left in place, they keep dpkg from
# removing a directory the new version no longer ships, and it warns.
case "$1" in
    upgrade)
        find /opt/meshbay-common/venv -depth -type d -name __pycache__ \
            -exec rm -rf {} + 2>/dev/null || true
        ;;
esac

#DEBHELPER#