summaryrefslogtreecommitdiffstats
path: root/ubuntu/precise/applications/kio-umountwrapper/debian
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2013-02-15 16:59:06 +0100
committerSlávek Banko <[email protected]>2013-02-15 16:59:06 +0100
commit683152f3b286a04a76f31ee1eed839bbdb2ab307 (patch)
treefc382ee1f535909a1892d0e07ebeb957fa68c49f /ubuntu/precise/applications/kio-umountwrapper/debian
parentcbfc487458706037e61278c9b5263685619d47f0 (diff)
downloadtde-packaging-683152f3b286a04a76f31ee1eed839bbdb2ab307.tar.gz
tde-packaging-683152f3b286a04a76f31ee1eed839bbdb2ab307.zip
Fix handling of diverts on Debian and Ubuntu
Diffstat (limited to 'ubuntu/precise/applications/kio-umountwrapper/debian')
-rw-r--r--ubuntu/precise/applications/kio-umountwrapper/debian/preinst33
1 files changed, 22 insertions, 11 deletions
diff --git a/ubuntu/precise/applications/kio-umountwrapper/debian/preinst b/ubuntu/precise/applications/kio-umountwrapper/debian/preinst
index f1e4f5d24..78e02c765 100644
--- a/ubuntu/precise/applications/kio-umountwrapper/debian/preinst
+++ b/ubuntu/precise/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
;;