summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick/kdeadmin
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-02-15 16:59:06 +0100
committerSlávek Banko <slavek.banko@axis.cz>2013-02-15 17:06:07 +0100
commitbedc66d159b698e1c1a9721debbac4867e11f844 (patch)
tree8f99f3df7dfdfa7e208d7a085c0c921b08141f36 /ubuntu/maverick/kdeadmin
parentcf7d83dc30f0a050e17fee4b7a6c10c8bc15044b (diff)
downloadtde-packaging-bedc66d159b698e1c1a9721debbac4867e11f844.tar.gz
tde-packaging-bedc66d159b698e1c1a9721debbac4867e11f844.zip
Fix handling of diverts on Debian and Ubuntu
(cherry picked from commit 683152f3b286a04a76f31ee1eed839bbdb2ab307)
Diffstat (limited to 'ubuntu/maverick/kdeadmin')
-rw-r--r--ubuntu/maverick/kdeadmin/debian/knetworkconf-trinity.postinst27
1 files changed, 20 insertions, 7 deletions
diff --git a/ubuntu/maverick/kdeadmin/debian/knetworkconf-trinity.postinst b/ubuntu/maverick/kdeadmin/debian/knetworkconf-trinity.postinst
index bcb12994d..94012bd76 100644
--- a/ubuntu/maverick/kdeadmin/debian/knetworkconf-trinity.postinst
+++ b/ubuntu/maverick/kdeadmin/debian/knetworkconf-trinity.postinst
@@ -1,15 +1,28 @@
#! /bin/sh -e
+package_name=knetworkconf-trinity
+
+divert_remove()
+ {
+ divert=`dpkg-divert --listpackage "$1"`
+ if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
+ dpkg-divert --remove --local --rename "$1"
+ fi
+ if [ -n "$divert" ] && [ "$divert" = "$package_name" ]; then
+ dpkg-divert --remove --package $package_name --rename "$1"
+ fi
+ }
+
case "$1" in
configure)
- dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/knetworkconf.png
- dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/knetworkconf.png
- dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/knetworkconf.png
- dpkg-divert --remove /usr/share/icons/hicolor/22x22/actions/network_connected_lan_knc.png
- dpkg-divert --remove /usr/share/icons/hicolor/22x22/actions/network_disconnected_lan.png
- dpkg-divert --remove /usr/share/icons/hicolor/22x22/actions/network_disconnected_wlan.png
- dpkg-divert --remove /usr/share/icons/hicolor/22x22/actions/network_traffic_wlan.png
+ divert_remove /usr/share/icons/hicolor/16x16/apps/knetworkconf.png
+ divert_remove /usr/share/icons/hicolor/22x22/apps/knetworkconf.png
+ divert_remove /usr/share/icons/hicolor/32x32/apps/knetworkconf.png
+ divert_remove /usr/share/icons/hicolor/22x22/actions/network_connected_lan_knc.png
+ divert_remove /usr/share/icons/hicolor/22x22/actions/network_disconnected_lan.png
+ divert_remove /usr/share/icons/hicolor/22x22/actions/network_disconnected_wlan.png
+ divert_remove /usr/share/icons/hicolor/22x22/actions/network_traffic_wlan.png
;;
abort-upgrade)