diff --git a/debian/changelog b/debian/changelog index 1b49e28a..14407803 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,11 +10,14 @@ byobu (2.17) unreleased; urgency=low byobu from within a screen session * byobu.1, byobu-config.1: move the putty bug note to the byobu manpage next to the keybinding documentation + * debian/postinst, debian/screen-profiles.postinst: ensure that + /usr/bin/screen doesn't disappear, which causes the dpkg-divert + removal to fail; LP: #390808 [ Ciemon Dunville ] * byobu.1: update description, add note about units of measure - -- Dustin Kirkland Thu, 25 Jun 2009 16:08:05 -0500 + -- Dustin Kirkland Fri, 26 Jun 2009 11:39:04 -0500 byobu (2.16-0ubuntu1) karmic; urgency=low diff --git a/debian/postinst b/debian/postinst index 651bb14e..e6626bfc 100644 --- a/debian/postinst +++ b/debian/postinst @@ -2,6 +2,10 @@ PKG="byobu" +# The target of the diversion somehow disappeared which will cause +# the divert removal to fail; we don't want that to happen +[ -e "/usr/bin/screen.real" ] && [ ! -e "/usr/bin/screen" ] && cp -a /usr/bin/screen.real /usr/bin/screen + # 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 diff --git a/debian/screen-profiles.postinst b/debian/screen-profiles.postinst index 455bc017..f9df5358 100644 --- a/debian/screen-profiles.postinst +++ b/debian/screen-profiles.postinst @@ -2,6 +2,12 @@ if dpkg --compare-versions "$2" lt-nl 2.0; then if [ -e "/usr/bin/screen.real" ]; then + if [ ! -e "/usr/bin/screen" ]; then + # The target of the diversion somehow disappeared + # which will cause the divert removal to fail; + # we don't want that to happen + cp -a /usr/bin/screen.real /usr/bin/screen + fi # clean up old screen diversion dpkg-divert --package screen-profiles --rename --remove /usr/bin/screen fi