summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick/applications/kio-umountwrapper
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 16:59:06 +0100
commit683152f3b286a04a76f31ee1eed839bbdb2ab307 (patch)
treefc382ee1f535909a1892d0e07ebeb957fa68c49f /ubuntu/maverick/applications/kio-umountwrapper
parentcbfc487458706037e61278c9b5263685619d47f0 (diff)
downloadtde-packaging-683152f3b286a04a76f31ee1eed839bbdb2ab307.tar.gz
tde-packaging-683152f3b286a04a76f31ee1eed839bbdb2ab307.zip
Fix handling of diverts on Debian and Ubuntu
Diffstat (limited to 'ubuntu/maverick/applications/kio-umountwrapper')
-rw-r--r--ubuntu/maverick/applications/kio-umountwrapper/debian/preinst33
1 files changed, 22 insertions, 11 deletions
diff --git a/ubuntu/maverick/applications/kio-umountwrapper/debian/preinst b/ubuntu/maverick/applications/kio-umountwrapper/debian/preinst
index f1e4f5d24..78e02c765 100644
--- a/ubuntu/maverick/applications/kio-umountwrapper/debian/preinst
+++ b/ubuntu/maverick/applications/kio-umountwrapper/debian/preinst
@@ -33,24 +33,35 @@ case "$1" in
--rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop
dpkg-divert --package $package_name \
+ --divert /opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop.distrib \
+ --rename /opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop
+
+ dpkg-divert --package $package_name \
--divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \
--rename /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop
- rm -f /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop
- rm -f /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop
-
;;
upgrade)
- dpkg-divert --package $package_name \
- --divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \
- --rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop
+ divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop"`
+ if [ -z "$divert" ]; then
+ dpkg-divert --package $package_name \
+ --divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \
+ --rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop
+ fi
- dpkg-divert --package $package_name \
- --divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \
- --rename /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop
+ divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop"`
+ if [ -z "$divert" ]; then
+ dpkg-divert --package $package_name \
+ --divert /opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop.distrib \
+ --rename /opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop
+ fi
- rm -f /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop
- rm -f /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop
+ divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop"`
+ if [ -z "$divert" ]; then
+ dpkg-divert --package $package_name \
+ --divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \
+ --rename /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop
+ fi
exit 0
;;