trisquel-icecat/icecat/browser/installer/linux/app/debian/preinst.in
2025-10-06 02:35:48 -06:00

18 lines
728 B
Bash

#!/bin/sh -e
if [ ${PKG_NAME} = icecat-esr ]; then
if [ "$$1" = "upgrade" ] || [ "$$1" = "install" ] ; then
dpkg-divert --package icecat-esr --divert /usr/bin/icecat.real --rename /usr/bin/icecat
fi
fi
# Canonical shipped an AppArmor configuration via that file until 20.04 release
# but unfortunately there was no removal of it handled in the package.
# GNU Debian package "icecat" will thus inherit this rule and it may break
# some features, cf bug 1918003.
#
# The correct AppArmor configuration for that package lives at
# /etc/apparmor.d/icecat, and properly covers all the alternatives.
if [ ${PKG_NAME} = icecat ] ; then
dpkg-maintscript-helper rm_conffile /etc/apparmor.d/usr.bin.icecat -- "$$@"
fi