* debian/postinst, debian/screen-profiles.postinst: ensure that

/usr/bin/screen doesn't disappear, which causes the dpkg-divert
    removal to fail; LP: #390808


Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-06-26 11:40:29 -05:00
commit bdfc140354
3 changed files with 14 additions and 1 deletions

5
debian/changelog vendored
View file

@ -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 <kirkland@ubuntu.com> Thu, 25 Jun 2009 16:08:05 -0500
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 26 Jun 2009 11:39:04 -0500
byobu (2.16-0ubuntu1) karmic; urgency=low

4
debian/postinst vendored
View file

@ -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

View file

@ -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