From fce6357ff45ae8d1e290a2282af13999da2d70b8 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Thu, 16 Oct 2008 11:37:37 +0300 Subject: [PATCH] Try sorting out emacsen mess once again (Closes: #481391). Depend on emacsen-common. old-prerm will most likely fail spewing emacsen-common error message when upgrading from previous version but this is OK. Add a custom prerm script which recovers from the problem and notifies the user to ignore the error message. Signed-off-by: Modestas Vainius --- debian/changelog | 10 ++++++++-- debian/cmake.prerm | 23 +++++++++++++++++++++++ debian/control | 2 +- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 debian/cmake.prerm diff --git a/debian/changelog b/debian/changelog index 6c21f5440..daefc1d93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,14 @@ cmake (2.6.2-2~pre1) UNRELEASED; urgency=low Thanks to Ludovico Cavedon (Closes: #487528). - FindMPEG2_include_FindSDL_fix.diff - fix FindSQL include in the MPEG2 module. Thanks to Leopold Palomo Avellaneda (Closes: #500770). - - -- Modestas Vainius Thu, 16 Oct 2008 11:03:18 +0300 + * Try sorting out emacsen mess once again (Closes: #481391): + - depend on emacsen-common; + - old-prerm will most likely fail spewing emacsen-common error message + when upgrading from previous version but this is OK. Add a custom + prerm script which recovers from the problem and notifies the user to + ignore the error message. + + -- Modestas Vainius Thu, 16 Oct 2008 11:17:00 +0300 cmake (2.6.2-1) experimental; urgency=low diff --git a/debian/cmake.prerm b/debian/cmake.prerm new file mode 100644 index 000000000..5e855b862 --- /dev/null +++ b/debian/cmake.prerm @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +if [ "$1" = "failed-upgrade" ] && dpkg --compare-versions "$2" le 2.6.2-1; then + # It is very likely that old-prerm failed due to emacsen-common being + # unconfigured at this stage. The error is harmless and cannot be avoided + # in a sane way. + # ERROR: emacsen-common being used before being configured. + # ERROR: This is likely a bug in the cmake package, which needs to + # ERROR: add one of the appropriate dependencies. + # ERROR: See /usr/share/doc/emacsen-common/debian-emacs-policy.gz + # ERROR: for details + # + # Therefore tell the user to ignore the error and exit gracefully. + echo <