File: python-dbus.postinst

package info (click to toggle)
dbus-python 1.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,068 kB
  • sloc: ansic: 9,267; sh: 4,578; python: 4,294; makefile: 530
file content (20 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -e

if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt "0.71-3"; then
    echo "Remove stale byte-compiled files..."
    rm -f /usr/lib/python2.[45]/site-packages/dbus.pyc
    rm -f /usr/lib/python2.[45]/site-packages/dbus.pyo
    rm -f /usr/lib/python2.[45]/site-packages/dbus/*.pyc
    rm -f /usr/lib/python2.[45]/site-packages/dbus/*.pyo
    for v in 2.4 2.5; do
        if [ -e /usr/lib/python${v}/site-packages/dbus ]; then
            rmdir --ignore-fail-on-non-empty \
                /usr/lib/python${v}/site-packages/dbus
        fi
    done
fi

#DEBHELPER#