diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-02-15 16:59:06 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-02-15 17:06:07 +0100 |
commit | bedc66d159b698e1c1a9721debbac4867e11f844 (patch) | |
tree | 8f99f3df7dfdfa7e208d7a085c0c921b08141f36 /ubuntu/maverick/applications/kio-umountwrapper/debian | |
parent | cf7d83dc30f0a050e17fee4b7a6c10c8bc15044b (diff) | |
download | tde-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/applications/kio-umountwrapper/debian')
-rw-r--r-- | ubuntu/maverick/applications/kio-umountwrapper/debian/preinst | 33 |
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 ;; |