diff --git a/debian/changelog b/debian/changelog index 2e6cda4d..9b56c790 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,11 +7,18 @@ byobu (2.16) unreleased; urgency=low * byobu-config, byobu-launcher, byobu-launcher-install, byobu-launcher-uninstall, debian/install, debian/rules, rpm/byobu.spec: rename to byobu-launcher* - * debian/rules: establish symlink for screen-launcher for existing - launch-on-login configurations; this seems better than auto-editing - user's .profile - -- Dustin Kirkland Tue, 23 Jun 2009 02:41:46 -0500 + Fixes for: LP: #391105, #390405 + * debian/control: add screen-profiles and screen-profiles-extras + transitional packages + * debian/postinst, debian/prerm, debian/rules: fix screen-profiles -> + byobu upgrades; drop byobu's attempt to remove the dpkg-divert on + /usr/bin/screen, as this fails; establish links in the postinst, + remove in the prerm + * debian/screen-profiles.postinst: remove the diversion on *installation* + of this transitional package + + -- Dustin Kirkland Tue, 23 Jun 2009 14:05:56 -0500 byobu (2.15-0ubuntu1) karmic; urgency=low diff --git a/debian/control b/debian/control index 3b4baeb2..cb07c38c 100644 --- a/debian/control +++ b/debian/control @@ -35,3 +35,15 @@ Description: additional colored profiles for the byobu package The byobu contains a basic set of light and dark screen profiles. The byobu-extras package provides additional profiles of various different light and dark colors. + +Package: screen-profiles +Depends: byobu +Architecture: all +Description: package renamed -> byobu + This package has been renamed to 'byobu'. + +Package: screen-profiles-extras +Depends: byobu-extras +Architecture: all +Description: package renamed -> byobu-extras + This package has been renamed to 'byobu-extras'. diff --git a/debian/postinst b/debian/postinst index ca4c0426..a002dbe2 100644 --- a/debian/postinst +++ b/debian/postinst @@ -2,14 +2,10 @@ PKG="byobu" -if [ -x "/usr/bin/screen.real" ]; then - # Byobu used to divert the real /usr/bin/screen, but we don't - # do this anymore; clean up old diversion if upgrading - if ls -alF /usr/bin/screen 2>/dev/null | grep -qs "^l.*/usr/bin/screen -> byobu"; then - rm -f /usr/bin/screen - fi - dpkg-divert --package "$PKG" --rename --remove /usr/bin/screen -fi +# The following two links significantly improve the upgrade +# experience from screen-profiles to byobu. +ln -sf /usr/bin/byobu-status /usr/bin/screen-profiles-status +ln -sf /usr/bin/byobu-launcher /usr/bin/screen-launcher # Notify users that they should reload their profile DIR="/var/run/screen" diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 00000000..73980559 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,10 @@ +#!/bin/sh -e + +PKG="byobu" + +# Remove helper symlinks +for i in /usr/bin/screen-profiles-status /usr/bin/screen-launcher; do + [ -h "$i" ] && rm -f "$i" +done + +#DEBHELPER# diff --git a/debian/rules b/debian/rules index 4c5d2fde..f37cf059 100755 --- a/debian/rules +++ b/debian/rules @@ -48,8 +48,10 @@ install: build install-po dh_testdir dh_testroot dh_clean -k - dh_link usr/bin/byobu-status usr/bin/screen-profiles-status - dh_link usr/bin/byobu-launcher usr/bin/screen-launcher + # These links must be done in the postinst, as screen-profiles might not + # be uninstalled yet + #dh_link usr/bin/byobu-status usr/bin/screen-profiles-status + #dh_link usr/bin/byobu-launcher usr/bin/screen-launcher dh_link usr/share/byobu/keybindings/f-keys usr/share/byobu/keybindings/common dh_install -X.bzr diff --git a/debian/screen-profiles.postinst b/debian/screen-profiles.postinst new file mode 100644 index 00000000..455bc017 --- /dev/null +++ b/debian/screen-profiles.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +if dpkg --compare-versions "$2" lt-nl 2.0; then + if [ -e "/usr/bin/screen.real" ]; then + # clean up old screen diversion + dpkg-divert --package screen-profiles --rename --remove /usr/bin/screen + fi +fi + +#DEBHELPER#