skeleton/debian/DISTNAME.prerm.tmpl
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 14 Feb 2012 15:14:22 +0100
brancholdstable
changeset 8231 1bb43e31032d
parent 0 b97547f5f1fa
permissions -rw-r--r--
[bfss, migration] fix storage migration (closes #2189206) The storage migration intend to clean the attributes cache but in practice it was trying to discard attribut edition. As no attribut were edited this lead to a crash.

#!/bin/sh -e

delete_pyo_pyc () {
  find /usr/share/cubicweb/cubes/%(cubename)s -name "*.pyc" | xargs rm -f
  find /usr/share/cubicweb/cubes/%(cubename)s -name "*.pyo" | xargs rm -f
}


case "$1" in
    failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;
    upgrade)
    delete_pyo_pyc
    ;;
    remove)
    delete_pyo_pyc
    ;;
    purge)
    ;;

    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1

esac

#DEBHELPER#