debian/postinst: correctly fix old-school screen-profiles era diversions

of /usr/bin/screen, LP: #727738
This commit is contained in:
Dustin Kirkland 2011-04-14 15:44:20 -05:00
commit 816a3c1802
2 changed files with 13 additions and 3 deletions

5
debian/changelog vendored
View file

@ -1,5 +1,6 @@
byobu (3.30) unreleased; urgency=low
[ Dustin Kirkland ]
* usr/share/applications/byobu.desktop: fix description
* usr/bin/byobu-status-detail: make a couple of minor modifications
noticed while investigating the already-fixed LP: #750887
@ -8,6 +9,10 @@ byobu (3.30) unreleased; urgency=low
* usr/share/byobu/profiles/common: preserve splits across detach/reattach,
LP: #760696
[ Chaskiel Grundman ]
* debian/postinst: correctly fix old-school screen-profiles era diversions
of /usr/bin/screen, LP: #727738
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 27 Feb 2011 10:29:53 -0600
byobu (3.29-0ubuntu1) natty; urgency=low

11
debian/postinst vendored
View file

@ -12,9 +12,14 @@ else
rm -f /etc/profile.d/Z98-$PKG.sh
fi
# 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
# Clean up any old-school screen-profiles diversions of /usr/bin/screen
if [ -f /usr/bin/screen ] && [ -f /usr/bin/screen.real ]; then
divertpkg=$(dpkg-divert --listpackage /usr/bin/screen)
if [ "$divertpkg" = "screen-profiles" ]; then
rm -f /usr/bin/screen
dpkg-divert --package screen-profiles --rename --remove /usr/bin/screen
fi
fi
# Remove the short-lived MOTD message
rm -f /etc/update-motd.d/55-window-manager