summaryrefslogtreecommitdiffstats
path: root/ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-12-03 19:58:52 +0100
committerSlávek Banko <slavek.banko@axis.cz>2013-12-03 19:58:52 +0100
commit730df33c514f3f07144abfc979f08a7127ed0de9 (patch)
tree867babe376d9a6db21edf2be3ee8367dac68c22a /ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst
parentaa94cd3c574a442956f905b05988839e1d964575 (diff)
downloadtde-packaging-730df33c514f3f07144abfc979f08a7127ed0de9.tar.gz
tde-packaging-730df33c514f3f07144abfc979f08a7127ed0de9.zip
Fix removing diverts from renamed packages on Debian and Ubuntu
Diffstat (limited to 'ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst')
-rw-r--r--ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst10
1 files changed, 8 insertions, 2 deletions
diff --git a/ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst b/ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst
index 4a2ab8a19..503524a11 100644
--- a/ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst
+++ b/ubuntu/raring/tdebase/debian/ksmserver-trinity.preinst
@@ -6,8 +6,14 @@ case "$1" in
upgrade)
# Remove old-style Plasma diversions
- dpkg-divert --package $package_name --rename --remove /usr/bin/plasma || true
- dpkg-divert --package $package_name --rename --remove /usr/bin/plasma-desktop || true
+ divert=`dpkg-divert --listpackage "/usr/bin/plasma"`
+ if [ -n "$divert" ]; then
+ dpkg-divert --package $package_name --rename --remove /usr/bin/plasma
+ fi
+ divert=`dpkg-divert --listpackage "/usr/bin/plasma-desktop"`
+ if [ -n "$divert" ]; then
+ dpkg-divert --package $package_name --rename --remove /usr/bin/plasma-desktop
+ fi
mkdir -p /usr/share/autostart
;;