Fix handling of diverts on Debian and Ubuntu

(cherry picked from commit 683152f3b2)
v3.5.13-sru
Slávek Banko 12 years ago
parent cf7d83dc30
commit bedc66d159

@ -11,8 +11,6 @@ fi
case "$1" in case "$1" in
configure) configure)
dpkg-divert --package $package_name --rename --remove \
/usr/trinity/bin/kdesu || true
;; ;;
abort-upgrade) abort-upgrade)
;; ;;

@ -16,9 +16,16 @@ case "$1" in
--rename /opt/trinity/bin/kdesu --rename /opt/trinity/bin/kdesu
;; ;;
upgrade) upgrade)
dpkg-divert --package $package_name \ divert=`dpkg-divert --listpackage "/usr/trinity/bin/kdesu"`
--divert /opt/trinity/bin/kdesu.distrib \ if [ -n "$divert" ] && [ "$divert" = "$package_name" ]; then
--rename /opt/trinity/bin/kdesu dpkg-divert --remove --package $package_name --rename "/usr/trinity/bin/kdesu"
fi
divert=`dpkg-divert --listpackage "/opt/trinity/bin/kdesu"`
if [ -z "$divert" ]; then
dpkg-divert --package $package_name \
--divert /opt/trinity/bin/kdesu.distrib \
--rename /opt/trinity/bin/kdesu
fi
;; ;;
abort-upgrade) abort-upgrade)
;; ;;

@ -32,25 +32,36 @@ case "$1" in
--divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \ --divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \
--rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop --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 \ dpkg-divert --package $package_name \
--divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \ --divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \
--rename /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop --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) upgrade)
dpkg-divert --package $package_name \ divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop"`
--divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \ if [ -z "$divert" ]; then
--rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop 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=`dpkg-divert --listpackage "/opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop"`
--divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \ if [ -z "$divert" ]; then
--rename /opt/trinity/share/apps/d3lphin/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
fi
rm -f /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop"`
rm -f /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 exit 0
;; ;;

@ -11,10 +11,22 @@ fi
case "$1" in case "$1" in
install) 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 dpkg-divert --package $package_name --divert /etc/acpi/powerbtn.sh.distrib --rename /etc/acpi/powerbtn.sh
;; ;;
upgrade) 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) abort-upgrade)
;; ;;

@ -1,15 +1,28 @@
#! /bin/sh -e #! /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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/knetworkconf.png divert_remove /usr/share/icons/hicolor/16x16/apps/knetworkconf.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/knetworkconf.png divert_remove /usr/share/icons/hicolor/22x22/apps/knetworkconf.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/knetworkconf.png divert_remove /usr/share/icons/hicolor/32x32/apps/knetworkconf.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/actions/network_connected_lan_knc.png 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 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 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/22x22/actions/network_traffic_wlan.png
;; ;;
abort-upgrade) abort-upgrade)

@ -1,14 +1,27 @@
#! /bin/sh -e #! /bin/sh -e
package_name=kappfinder-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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/icons/hicolor/128x128/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/128x128/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/16x16/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/22x22/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/32x32/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/48x48/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/48x48/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/64x64/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/64x64/apps/kappfinder.png
;; ;;
install) install)

@ -1,13 +1,26 @@
#! /bin/sh -e #! /bin/sh -e
package_name=kfind-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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/kfind.png divert_remove /usr/share/icons/hicolor/16x16/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/kfind.png divert_remove /usr/share/icons/hicolor/22x22/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/kfind.png divert_remove /usr/share/icons/hicolor/32x32/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/48x48/apps/kfind.png divert_remove /usr/share/icons/hicolor/48x48/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/64x64/apps/kfind.png divert_remove /usr/share/icons/hicolor/64x64/apps/kfind.png
;; ;;
install) install)

@ -1,16 +1,29 @@
#! /bin/sh -e #! /bin/sh -e
package_name=konqueror-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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/autostart/konqy_preload.desktop divert_remove /usr/share/autostart/konqy_preload.desktop
dpkg-divert --remove /usr/share/icons/hicolor/128x128/apps/konqueror.png divert_remove /usr/share/icons/hicolor/128x128/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/konqueror.png divert_remove /usr/share/icons/hicolor/16x16/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/konqueror.png divert_remove /usr/share/icons/hicolor/22x22/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/konqueror.png divert_remove /usr/share/icons/hicolor/32x32/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/48x48/apps/konqueror.png divert_remove /usr/share/icons/hicolor/48x48/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/64x64/apps/konqueror.png divert_remove /usr/share/icons/hicolor/64x64/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/scalable/apps/konqueror.svgz divert_remove /usr/share/icons/hicolor/scalable/apps/konqueror.svgz
;; ;;
install) install)

@ -1,12 +1,16 @@
#! /bin/sh -e #! /bin/sh -e
package_name=ksmserver-trinity
case "$1" in case "$1" in
remove) remove)
# Intrepid plasma # Intrepid plasma
dpkg-divert --remove --rename /usr/bin/plasma dpkg-divert --package $package_name \
--rename --remove /usr/bin/plasma
# Jaunty plasma-desktop # Jaunty plasma-desktop
dpkg-divert --remove --rename /usr/bin/plasma-desktop dpkg-divert --package $package_name \
--rename --remove /usr/bin/plasma-desktop
;; ;;
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

@ -1,5 +1,7 @@
#! /bin/sh -e #! /bin/sh -e
package_name=ksmserver-trinity
case "$1" in case "$1" in
upgrade) upgrade)
@ -10,32 +12,78 @@ case "$1" in
mkdir -p /usr/share/autostart mkdir -p /usr/share/autostart
# Intrepid plasma # Intrepid plasma
dpkg-divert --remove --rename /usr/share/autostart/plasma.desktop divert=`dpkg-divert --listpackage /usr/share/autostart/plasma.desktop`
mkdir -p /usr/bin if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
dpkg-divert --add --rename --divert /usr/bin/plasma.kde4 /usr/bin/plasma dpkg-divert --remove --local --rename /usr/share/autostart/plasma.desktop
rm -f /usr/bin/plasma fi
ln -s /usr/bin/plasma.autodetect /usr/bin/plasma divert=`dpkg-divert --listpackage /usr/bin/plasma`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma ]; then
rm -f /usr/bin/plasma
fi
dpkg-divert --remove --local --rename /usr/bin/plasma
divert=""
fi
if [ -z "$divert" ]; then
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma.kde4 \
--add /usr/bin/plasma
fi
# Jaunty plasma-desktop # Jaunty plasma-desktop
dpkg-divert --remove --rename /usr/share/autostart/plasma-desktop.desktop divert=`dpkg-divert --listpackage /usr/share/autostart/plasma-desktop.desktop`
mkdir -p /usr/bin if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
dpkg-divert --add --rename --divert /usr/bin/plasma-desktop.kde4 /usr/bin/plasma-desktop dpkg-divert --remove --local --rename /usr/share/autostart/plasma-desktop.desktop
rm -f /usr/bin/plasma-desktop fi
ln -s /usr/bin/plasma-desktop.autodetect /usr/bin/plasma-desktop divert=`dpkg-divert --listpackage /usr/bin/plasma-desktop`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma-desktop ]; then
rm -f /usr/bin/plasma-desktop
fi
dpkg-divert --remove --local --rename /usr/bin/plasma-desktop
divert=""
fi
if [ -z "$divert" ]; then
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma-desktop.kde4 \
--add /usr/bin/plasma-desktop
fi
;; ;;
install) install)
# Intrepid plasma # Intrepid plasma
mkdir -p /usr/bin divert=`dpkg-divert --listpackage /usr/share/autostart/plasma.desktop`
dpkg-divert --add --rename --divert /usr/bin/plasma.kde4 /usr/bin/plasma if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
rm -f /usr/bin/plasma dpkg-divert --remove --local --rename /usr/share/autostart/plasma.desktop
ln -s /usr/bin/plasma.autodetect /usr/bin/plasma fi
divert=`dpkg-divert --listpackage /usr/bin/plasma`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma ]; then
rm -f /usr/bin/plasma
fi
dpkg-divert --remove --local --rename /usr/bin/plasma
divert=""
fi
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma.kde4 \
--add /usr/bin/plasma
# Jaunty plasma-desktop # Jaunty plasma-desktop
mkdir -p /usr/bin divert=`dpkg-divert --listpackage /usr/share/autostart/plasma-desktop.desktop`
dpkg-divert --add --rename --divert /usr/bin/plasma-desktop.kde4 /usr/bin/plasma-desktop if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
rm -f /usr/bin/plasma-desktop dpkg-divert --remove --local --rename /usr/share/autostart/plasma-desktop.desktop
ln -s /usr/bin/plasma-desktop.autodetect /usr/bin/plasma-desktop fi
divert=`dpkg-divert --listpackage /usr/bin/plasma-desktop`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma-desktop ]; then
rm -f /usr/bin/plasma-desktop
fi
dpkg-divert --remove --local --rename /usr/bin/plasma-desktop
divert=""
fi
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma-desktop.kde4 \
--add /usr/bin/plasma-desktop
;; ;;
abort-upgrade) abort-upgrade)

@ -20,7 +20,6 @@ set -e
case "$1" in case "$1" in
remove) remove)
/usr/sbin/update-alternatives --remove x-session-manager /usr/trinity/bin/startkde /usr/sbin/update-alternatives --remove x-session-manager /usr/trinity/bin/startkde
dpkg-divert --rename --remove /usr/share/autostart/plasma.desktop
;; ;;
upgrade|deconfigure) upgrade|deconfigure)

@ -273,5 +273,5 @@ binary-install/kdebase-trinity-bin::
binary-install/ksmserver-trinity:: binary-install/ksmserver-trinity::
install -p -D -m644 debian/tmp/opt/trinity/share/apps/kdm/sessions/tde.desktop debian/ksmserver-trinity/usr/share/xsessions/trinity.desktop install -p -D -m644 debian/tmp/opt/trinity/share/apps/kdm/sessions/tde.desktop debian/ksmserver-trinity/usr/share/xsessions/trinity.desktop
install -p -D -m755 debian/plasma.autodetect debian/ksmserver-trinity/usr/bin/plasma.autodetect install -p -D -m755 debian/plasma.autodetect debian/ksmserver-trinity/usr/bin/plasma
install -p -D -m755 debian/plasma-desktop.autodetect debian/ksmserver-trinity/usr/bin/plasma-desktop.autodetect install -p -D -m755 debian/plasma-desktop.autodetect debian/ksmserver-trinity/usr/bin/plasma-desktop

@ -11,8 +11,6 @@ fi
case "$1" in case "$1" in
configure) configure)
dpkg-divert --package $package_name --rename --remove \
/usr/trinity/bin/kdesu || true
;; ;;
abort-upgrade) abort-upgrade)
;; ;;

@ -16,9 +16,16 @@ case "$1" in
--rename /opt/trinity/bin/kdesu --rename /opt/trinity/bin/kdesu
;; ;;
upgrade) upgrade)
dpkg-divert --package $package_name \ divert=`dpkg-divert --listpackage "/usr/trinity/bin/kdesu"`
--divert /opt/trinity/bin/kdesu.distrib \ if [ -n "$divert" ] && [ "$divert" = "$package_name" ]; then
--rename /opt/trinity/bin/kdesu dpkg-divert --remove --package $package_name --rename "/usr/trinity/bin/kdesu"
fi
divert=`dpkg-divert --listpackage "/opt/trinity/bin/kdesu"`
if [ -z "$divert" ]; then
dpkg-divert --package $package_name \
--divert /opt/trinity/bin/kdesu.distrib \
--rename /opt/trinity/bin/kdesu
fi
;; ;;
abort-upgrade) abort-upgrade)
;; ;;

@ -32,25 +32,36 @@ case "$1" in
--divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \ --divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \
--rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop --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 \ dpkg-divert --package $package_name \
--divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \ --divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \
--rename /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop --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) upgrade)
dpkg-divert --package $package_name \ divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop"`
--divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \ if [ -z "$divert" ]; then
--rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop 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=`dpkg-divert --listpackage "/opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop"`
--divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \ if [ -z "$divert" ]; then
--rename /opt/trinity/share/apps/d3lphin/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
fi
rm -f /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop"`
rm -f /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 exit 0
;; ;;

@ -11,10 +11,22 @@ fi
case "$1" in case "$1" in
install) 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 dpkg-divert --package $package_name --divert /etc/acpi/powerbtn.sh.distrib --rename /etc/acpi/powerbtn.sh
;; ;;
upgrade) 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) abort-upgrade)
;; ;;

@ -1,15 +1,28 @@
#! /bin/sh -e #! /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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/knetworkconf.png divert_remove /usr/share/icons/hicolor/16x16/apps/knetworkconf.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/knetworkconf.png divert_remove /usr/share/icons/hicolor/22x22/apps/knetworkconf.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/knetworkconf.png divert_remove /usr/share/icons/hicolor/32x32/apps/knetworkconf.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/actions/network_connected_lan_knc.png 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 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 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/22x22/actions/network_traffic_wlan.png
;; ;;
abort-upgrade) abort-upgrade)

@ -1,14 +1,27 @@
#! /bin/sh -e #! /bin/sh -e
package_name=kappfinder-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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/icons/hicolor/128x128/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/128x128/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/16x16/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/22x22/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/32x32/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/48x48/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/48x48/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/64x64/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/64x64/apps/kappfinder.png
;; ;;
install) install)

@ -1,13 +1,26 @@
#! /bin/sh -e #! /bin/sh -e
package_name=kfind-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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/kfind.png divert_remove /usr/share/icons/hicolor/16x16/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/kfind.png divert_remove /usr/share/icons/hicolor/22x22/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/kfind.png divert_remove /usr/share/icons/hicolor/32x32/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/48x48/apps/kfind.png divert_remove /usr/share/icons/hicolor/48x48/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/64x64/apps/kfind.png divert_remove /usr/share/icons/hicolor/64x64/apps/kfind.png
;; ;;
install) install)

@ -1,16 +1,29 @@
#! /bin/sh -e #! /bin/sh -e
package_name=konqueror-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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/autostart/konqy_preload.desktop divert_remove /usr/share/autostart/konqy_preload.desktop
dpkg-divert --remove /usr/share/icons/hicolor/128x128/apps/konqueror.png divert_remove /usr/share/icons/hicolor/128x128/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/konqueror.png divert_remove /usr/share/icons/hicolor/16x16/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/konqueror.png divert_remove /usr/share/icons/hicolor/22x22/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/konqueror.png divert_remove /usr/share/icons/hicolor/32x32/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/48x48/apps/konqueror.png divert_remove /usr/share/icons/hicolor/48x48/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/64x64/apps/konqueror.png divert_remove /usr/share/icons/hicolor/64x64/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/scalable/apps/konqueror.svgz divert_remove /usr/share/icons/hicolor/scalable/apps/konqueror.svgz
;; ;;
install) install)

@ -1,12 +1,16 @@
#! /bin/sh -e #! /bin/sh -e
package_name=ksmserver-trinity
case "$1" in case "$1" in
remove) remove)
# Intrepid plasma # Intrepid plasma
dpkg-divert --remove --rename /usr/bin/plasma dpkg-divert --package $package_name \
--rename --remove /usr/bin/plasma
# Jaunty plasma-desktop # Jaunty plasma-desktop
dpkg-divert --remove --rename /usr/bin/plasma-desktop dpkg-divert --package $package_name \
--rename --remove /usr/bin/plasma-desktop
;; ;;
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

@ -1,5 +1,7 @@
#! /bin/sh -e #! /bin/sh -e
package_name=ksmserver-trinity
case "$1" in case "$1" in
upgrade) upgrade)
@ -10,32 +12,78 @@ case "$1" in
mkdir -p /usr/share/autostart mkdir -p /usr/share/autostart
# Intrepid plasma # Intrepid plasma
dpkg-divert --remove --rename /usr/share/autostart/plasma.desktop divert=`dpkg-divert --listpackage /usr/share/autostart/plasma.desktop`
mkdir -p /usr/bin if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
dpkg-divert --add --rename --divert /usr/bin/plasma.kde4 /usr/bin/plasma dpkg-divert --remove --local --rename /usr/share/autostart/plasma.desktop
rm -f /usr/bin/plasma fi
ln -s /usr/bin/plasma.autodetect /usr/bin/plasma divert=`dpkg-divert --listpackage /usr/bin/plasma`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma ]; then
rm -f /usr/bin/plasma
fi
dpkg-divert --remove --local --rename /usr/bin/plasma
divert=""
fi
if [ -z "$divert" ]; then
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma.kde4 \
--add /usr/bin/plasma
fi
# Jaunty plasma-desktop # Jaunty plasma-desktop
dpkg-divert --remove --rename /usr/share/autostart/plasma-desktop.desktop divert=`dpkg-divert --listpackage /usr/share/autostart/plasma-desktop.desktop`
mkdir -p /usr/bin if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
dpkg-divert --add --rename --divert /usr/bin/plasma-desktop.kde4 /usr/bin/plasma-desktop dpkg-divert --remove --local --rename /usr/share/autostart/plasma-desktop.desktop
rm -f /usr/bin/plasma-desktop fi
ln -s /usr/bin/plasma-desktop.autodetect /usr/bin/plasma-desktop divert=`dpkg-divert --listpackage /usr/bin/plasma-desktop`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma-desktop ]; then
rm -f /usr/bin/plasma-desktop
fi
dpkg-divert --remove --local --rename /usr/bin/plasma-desktop
divert=""
fi
if [ -z "$divert" ]; then
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma-desktop.kde4 \
--add /usr/bin/plasma-desktop
fi
;; ;;
install) install)
# Intrepid plasma # Intrepid plasma
mkdir -p /usr/bin divert=`dpkg-divert --listpackage /usr/share/autostart/plasma.desktop`
dpkg-divert --add --rename --divert /usr/bin/plasma.kde4 /usr/bin/plasma if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
rm -f /usr/bin/plasma dpkg-divert --remove --local --rename /usr/share/autostart/plasma.desktop
ln -s /usr/bin/plasma.autodetect /usr/bin/plasma fi
divert=`dpkg-divert --listpackage /usr/bin/plasma`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma ]; then
rm -f /usr/bin/plasma
fi
dpkg-divert --remove --local --rename /usr/bin/plasma
divert=""
fi
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma.kde4 \
--add /usr/bin/plasma
# Jaunty plasma-desktop # Jaunty plasma-desktop
mkdir -p /usr/bin divert=`dpkg-divert --listpackage /usr/share/autostart/plasma-desktop.desktop`
dpkg-divert --add --rename --divert /usr/bin/plasma-desktop.kde4 /usr/bin/plasma-desktop if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
rm -f /usr/bin/plasma-desktop dpkg-divert --remove --local --rename /usr/share/autostart/plasma-desktop.desktop
ln -s /usr/bin/plasma-desktop.autodetect /usr/bin/plasma-desktop fi
divert=`dpkg-divert --listpackage /usr/bin/plasma-desktop`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma-desktop ]; then
rm -f /usr/bin/plasma-desktop
fi
dpkg-divert --remove --local --rename /usr/bin/plasma-desktop
divert=""
fi
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma-desktop.kde4 \
--add /usr/bin/plasma-desktop
;; ;;
abort-upgrade) abort-upgrade)

@ -20,7 +20,6 @@ set -e
case "$1" in case "$1" in
remove) remove)
/usr/sbin/update-alternatives --remove x-session-manager /usr/trinity/bin/startkde /usr/sbin/update-alternatives --remove x-session-manager /usr/trinity/bin/startkde
dpkg-divert --rename --remove /usr/share/autostart/plasma.desktop
;; ;;
upgrade|deconfigure) upgrade|deconfigure)

@ -273,5 +273,5 @@ binary-install/kdebase-trinity-bin::
binary-install/ksmserver-trinity:: binary-install/ksmserver-trinity::
install -p -D -m644 debian/tmp/opt/trinity/share/apps/kdm/sessions/tde.desktop debian/ksmserver-trinity/usr/share/xsessions/trinity.desktop install -p -D -m644 debian/tmp/opt/trinity/share/apps/kdm/sessions/tde.desktop debian/ksmserver-trinity/usr/share/xsessions/trinity.desktop
install -p -D -m755 debian/plasma.autodetect debian/ksmserver-trinity/usr/bin/plasma.autodetect install -p -D -m755 debian/plasma.autodetect debian/ksmserver-trinity/usr/bin/plasma
install -p -D -m755 debian/plasma-desktop.autodetect debian/ksmserver-trinity/usr/bin/plasma-desktop.autodetect install -p -D -m755 debian/plasma-desktop.autodetect debian/ksmserver-trinity/usr/bin/plasma-desktop

@ -11,8 +11,6 @@ fi
case "$1" in case "$1" in
configure) configure)
dpkg-divert --package $package_name --rename --remove \
/usr/trinity/bin/kdesu || true
;; ;;
abort-upgrade) abort-upgrade)
;; ;;

@ -16,9 +16,16 @@ case "$1" in
--rename /opt/trinity/bin/kdesu --rename /opt/trinity/bin/kdesu
;; ;;
upgrade) upgrade)
dpkg-divert --package $package_name \ divert=`dpkg-divert --listpackage "/usr/trinity/bin/kdesu"`
--divert /opt/trinity/bin/kdesu.distrib \ if [ -n "$divert" ] && [ "$divert" = "$package_name" ]; then
--rename /opt/trinity/bin/kdesu dpkg-divert --remove --package $package_name --rename "/usr/trinity/bin/kdesu"
fi
divert=`dpkg-divert --listpackage "/opt/trinity/bin/kdesu"`
if [ -z "$divert" ]; then
dpkg-divert --package $package_name \
--divert /opt/trinity/bin/kdesu.distrib \
--rename /opt/trinity/bin/kdesu
fi
;; ;;
abort-upgrade) abort-upgrade)
;; ;;

@ -32,25 +32,36 @@ case "$1" in
--divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \ --divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \
--rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop --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 \ dpkg-divert --package $package_name \
--divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \ --divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \
--rename /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop --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) upgrade)
dpkg-divert --package $package_name \ divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop"`
--divert /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop.distrib \ if [ -z "$divert" ]; then
--rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop 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=`dpkg-divert --listpackage "/opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop"`
--divert /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop.distrib \ if [ -z "$divert" ]; then
--rename /opt/trinity/share/apps/d3lphin/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
fi
rm -f /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop"`
rm -f /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 exit 0
;; ;;

@ -11,10 +11,22 @@ fi
case "$1" in case "$1" in
install) 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 dpkg-divert --package $package_name --divert /etc/acpi/powerbtn.sh.distrib --rename /etc/acpi/powerbtn.sh
;; ;;
upgrade) 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) abort-upgrade)
;; ;;

@ -1,15 +1,28 @@
#! /bin/sh -e #! /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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/knetworkconf.png divert_remove /usr/share/icons/hicolor/16x16/apps/knetworkconf.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/knetworkconf.png divert_remove /usr/share/icons/hicolor/22x22/apps/knetworkconf.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/knetworkconf.png divert_remove /usr/share/icons/hicolor/32x32/apps/knetworkconf.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/actions/network_connected_lan_knc.png 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 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 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/22x22/actions/network_traffic_wlan.png
;; ;;
abort-upgrade) abort-upgrade)

@ -1,14 +1,27 @@
#! /bin/sh -e #! /bin/sh -e
package_name=kappfinder-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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/icons/hicolor/128x128/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/128x128/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/16x16/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/22x22/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/32x32/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/48x48/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/48x48/apps/kappfinder.png
dpkg-divert --remove /usr/share/icons/hicolor/64x64/apps/kappfinder.png divert_remove /usr/share/icons/hicolor/64x64/apps/kappfinder.png
;; ;;
install) install)

@ -1,13 +1,26 @@
#! /bin/sh -e #! /bin/sh -e
package_name=kfind-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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/kfind.png divert_remove /usr/share/icons/hicolor/16x16/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/kfind.png divert_remove /usr/share/icons/hicolor/22x22/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/kfind.png divert_remove /usr/share/icons/hicolor/32x32/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/48x48/apps/kfind.png divert_remove /usr/share/icons/hicolor/48x48/apps/kfind.png
dpkg-divert --remove /usr/share/icons/hicolor/64x64/apps/kfind.png divert_remove /usr/share/icons/hicolor/64x64/apps/kfind.png
;; ;;
install) install)

@ -1,16 +1,29 @@
#! /bin/sh -e #! /bin/sh -e
package_name=konqueror-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 case "$1" in
configure) configure)
dpkg-divert --remove /usr/share/autostart/konqy_preload.desktop divert_remove /usr/share/autostart/konqy_preload.desktop
dpkg-divert --remove /usr/share/icons/hicolor/128x128/apps/konqueror.png divert_remove /usr/share/icons/hicolor/128x128/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/16x16/apps/konqueror.png divert_remove /usr/share/icons/hicolor/16x16/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/22x22/apps/konqueror.png divert_remove /usr/share/icons/hicolor/22x22/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/32x32/apps/konqueror.png divert_remove /usr/share/icons/hicolor/32x32/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/48x48/apps/konqueror.png divert_remove /usr/share/icons/hicolor/48x48/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/64x64/apps/konqueror.png divert_remove /usr/share/icons/hicolor/64x64/apps/konqueror.png
dpkg-divert --remove /usr/share/icons/hicolor/scalable/apps/konqueror.svgz divert_remove /usr/share/icons/hicolor/scalable/apps/konqueror.svgz
;; ;;
install) install)

@ -1,12 +1,16 @@
#! /bin/sh -e #! /bin/sh -e
package_name=ksmserver-trinity
case "$1" in case "$1" in
remove) remove)
# Intrepid plasma # Intrepid plasma
dpkg-divert --remove --rename /usr/bin/plasma dpkg-divert --package $package_name \
--rename --remove /usr/bin/plasma
# Jaunty plasma-desktop # Jaunty plasma-desktop
dpkg-divert --remove --rename /usr/bin/plasma-desktop dpkg-divert --package $package_name \
--rename --remove /usr/bin/plasma-desktop
;; ;;
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

@ -1,5 +1,7 @@
#! /bin/sh -e #! /bin/sh -e
package_name=ksmserver-trinity
case "$1" in case "$1" in
upgrade) upgrade)
@ -10,32 +12,78 @@ case "$1" in
mkdir -p /usr/share/autostart mkdir -p /usr/share/autostart
# Intrepid plasma # Intrepid plasma
dpkg-divert --remove --rename /usr/share/autostart/plasma.desktop divert=`dpkg-divert --listpackage /usr/share/autostart/plasma.desktop`
mkdir -p /usr/bin if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
dpkg-divert --add --rename --divert /usr/bin/plasma.kde4 /usr/bin/plasma dpkg-divert --remove --local --rename /usr/share/autostart/plasma.desktop
rm -f /usr/bin/plasma fi
ln -s /usr/bin/plasma.autodetect /usr/bin/plasma divert=`dpkg-divert --listpackage /usr/bin/plasma`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma ]; then
rm -f /usr/bin/plasma
fi
dpkg-divert --remove --local --rename /usr/bin/plasma
divert=""
fi
if [ -z "$divert" ]; then
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma.kde4 \
--add /usr/bin/plasma
fi
# Jaunty plasma-desktop # Jaunty plasma-desktop
dpkg-divert --remove --rename /usr/share/autostart/plasma-desktop.desktop divert=`dpkg-divert --listpackage /usr/share/autostart/plasma-desktop.desktop`
mkdir -p /usr/bin if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
dpkg-divert --add --rename --divert /usr/bin/plasma-desktop.kde4 /usr/bin/plasma-desktop dpkg-divert --remove --local --rename /usr/share/autostart/plasma-desktop.desktop
rm -f /usr/bin/plasma-desktop fi
ln -s /usr/bin/plasma-desktop.autodetect /usr/bin/plasma-desktop divert=`dpkg-divert --listpackage /usr/bin/plasma-desktop`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma-desktop ]; then
rm -f /usr/bin/plasma-desktop
fi
dpkg-divert --remove --local --rename /usr/bin/plasma-desktop
divert=""
fi
if [ -z "$divert" ]; then
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma-desktop.kde4 \
--add /usr/bin/plasma-desktop
fi
;; ;;
install) install)
# Intrepid plasma # Intrepid plasma
mkdir -p /usr/bin divert=`dpkg-divert --listpackage /usr/share/autostart/plasma.desktop`
dpkg-divert --add --rename --divert /usr/bin/plasma.kde4 /usr/bin/plasma if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
rm -f /usr/bin/plasma dpkg-divert --remove --local --rename /usr/share/autostart/plasma.desktop
ln -s /usr/bin/plasma.autodetect /usr/bin/plasma fi
divert=`dpkg-divert --listpackage /usr/bin/plasma`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma ]; then
rm -f /usr/bin/plasma
fi
dpkg-divert --remove --local --rename /usr/bin/plasma
divert=""
fi
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma.kde4 \
--add /usr/bin/plasma
# Jaunty plasma-desktop # Jaunty plasma-desktop
mkdir -p /usr/bin divert=`dpkg-divert --listpackage /usr/share/autostart/plasma-desktop.desktop`
dpkg-divert --add --rename --divert /usr/bin/plasma-desktop.kde4 /usr/bin/plasma-desktop if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
rm -f /usr/bin/plasma-desktop dpkg-divert --remove --local --rename /usr/share/autostart/plasma-desktop.desktop
ln -s /usr/bin/plasma-desktop.autodetect /usr/bin/plasma-desktop fi
divert=`dpkg-divert --listpackage /usr/bin/plasma-desktop`
if [ -n "$divert" ] && [ "$divert" = "LOCAL" ]; then
if [ -L /usr/bin/plasma-desktop ]; then
rm -f /usr/bin/plasma-desktop
fi
dpkg-divert --remove --local --rename /usr/bin/plasma-desktop
divert=""
fi
dpkg-divert --package $package_name --rename \
--divert /usr/bin/plasma-desktop.kde4 \
--add /usr/bin/plasma-desktop
;; ;;
abort-upgrade) abort-upgrade)

@ -20,7 +20,6 @@ set -e
case "$1" in case "$1" in
remove) remove)
/usr/sbin/update-alternatives --remove x-session-manager /usr/trinity/bin/startkde /usr/sbin/update-alternatives --remove x-session-manager /usr/trinity/bin/startkde
dpkg-divert --rename --remove /usr/share/autostart/plasma.desktop
;; ;;
upgrade|deconfigure) upgrade|deconfigure)

@ -273,5 +273,5 @@ binary-install/kdebase-trinity-bin::
binary-install/ksmserver-trinity:: binary-install/ksmserver-trinity::
install -p -D -m644 debian/tmp/opt/trinity/share/apps/kdm/sessions/tde.desktop debian/ksmserver-trinity/usr/share/xsessions/trinity.desktop install -p -D -m644 debian/tmp/opt/trinity/share/apps/kdm/sessions/tde.desktop debian/ksmserver-trinity/usr/share/xsessions/trinity.desktop
install -p -D -m755 debian/plasma.autodetect debian/ksmserver-trinity/usr/bin/plasma.autodetect install -p -D -m755 debian/plasma.autodetect debian/ksmserver-trinity/usr/bin/plasma
install -p -D -m755 debian/plasma-desktop.autodetect debian/ksmserver-trinity/usr/bin/plasma-desktop.autodetect install -p -D -m755 debian/plasma-desktop.autodetect debian/ksmserver-trinity/usr/bin/plasma-desktop

Loading…
Cancel
Save