diff options
Diffstat (limited to 'debian/squeeze/applications')
5 files changed, 58 insertions, 18 deletions
diff --git a/debian/squeeze/applications/kio-umountwrapper/debian/preinst b/debian/squeeze/applications/kio-umountwrapper/debian/preinst index f1e4f5d24..78e02c765 100644 --- a/debian/squeeze/applications/kio-umountwrapper/debian/preinst +++ b/debian/squeeze/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 ;; diff --git a/debian/squeeze/applications/kpowersave-nohal/debian/preinst b/debian/squeeze/applications/kpowersave-nohal/debian/preinst index a66bf589f..5b0e73f61 100644 --- a/debian/squeeze/applications/kpowersave-nohal/debian/preinst +++ b/debian/squeeze/applications/kpowersave-nohal/debian/preinst @@ -11,10 +11,22 @@ fi case "$1" in install) + divert=`dpkg-divert --listpackage "/etc/acpi/powerbtn.sh"` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + dpkg-divert --remove --local --rename "/etc/acpi/powerbtn.sh" + divert="" + fi dpkg-divert --package $package_name --divert /etc/acpi/powerbtn.sh.distrib --rename /etc/acpi/powerbtn.sh ;; upgrade) - dpkg-divert --package $package_name --divert /etc/acpi/powerbtn.sh.distrib --rename /etc/acpi/powerbtn.sh + divert=`dpkg-divert --listpackage "/etc/acpi/powerbtn.sh"` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + dpkg-divert --remove --local --rename "/etc/acpi/powerbtn.sh" + divert="" + fi + if [ -z "$divert" ]; then + dpkg-divert --package $package_name --divert /etc/acpi/powerbtn.sh.distrib --rename /etc/acpi/powerbtn.sh + fi ;; abort-upgrade) ;; diff --git a/debian/squeeze/applications/kpowersave/debian/preinst b/debian/squeeze/applications/kpowersave/debian/preinst index b007ccf90..d0eb1227c 100644 --- a/debian/squeeze/applications/kpowersave/debian/preinst +++ b/debian/squeeze/applications/kpowersave/debian/preinst @@ -11,10 +11,22 @@ fi case "$1" in install) + divert=`dpkg-divert --listpackage "/etc/acpi/powerbtn.sh"` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + dpkg-divert --remove --local --rename "/etc/acpi/powerbtn.sh" + divert="" + fi dpkg-divert --package $package_name --divert /etc/acpi/powerbtn.sh.distrib --rename /etc/acpi/powerbtn.sh ;; upgrade) - dpkg-divert --package $package_name --divert /etc/acpi/powerbtn.sh.distrib --rename /etc/acpi/powerbtn.sh + divert=`dpkg-divert --listpackage "/etc/acpi/powerbtn.sh"` + if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then + dpkg-divert --remove --local --rename "/etc/acpi/powerbtn.sh" + divert="" + fi + if [ -z "$divert" ]; then + dpkg-divert --package $package_name --divert /etc/acpi/powerbtn.sh.distrib --rename /etc/acpi/powerbtn.sh + fi ;; abort-upgrade) ;; diff --git a/debian/squeeze/applications/tdesudo/debian/postinst b/debian/squeeze/applications/tdesudo/debian/postinst index 9164f9d4a..5269ffae5 100644 --- a/debian/squeeze/applications/tdesudo/debian/postinst +++ b/debian/squeeze/applications/tdesudo/debian/postinst @@ -11,8 +11,6 @@ fi case "$1" in configure) - dpkg-divert --package $package_name --rename --remove \ - /usr/trinity/bin/tdesu || true ;; abort-upgrade) ;; diff --git a/debian/squeeze/applications/tdesudo/debian/preinst b/debian/squeeze/applications/tdesudo/debian/preinst index a13492559..770dfaacb 100644 --- a/debian/squeeze/applications/tdesudo/debian/preinst +++ b/debian/squeeze/applications/tdesudo/debian/preinst @@ -16,9 +16,16 @@ case "$1" in --rename /opt/trinity/bin/tdesu ;; upgrade) - dpkg-divert --package $package_name \ - --divert /opt/trinity/bin/tdesu.distrib \ - --rename /opt/trinity/bin/tdesu + divert=`dpkg-divert --listpackage "/usr/trinity/bin/tdesu"` + if [ -n "$divert" ] && [ "$divert" = "$package_name" ]; then + dpkg-divert --remove --package $package_name --rename "/usr/trinity/bin/tdesu" + fi + divert=`dpkg-divert --listpackage "/opt/trinity/bin/tdesu"` + if [ -z "$divert" ]; then + dpkg-divert --package $package_name \ + --divert /opt/trinity/bin/tdesu.distrib \ + --rename /opt/trinity/bin/tdesu + fi ;; abort-upgrade) ;; |