[Pkg-samba-maint] [samba] 01/01: Move update-alternatives upgrade removal handling to the postinst, where it belongs. Closes: 730090.

Steve Langasek vorlon at moszumanska.debian.org
Mon Nov 25 03:09:36 UTC 2013


This is an automated email from the git hooks/post-receive script.

vorlon pushed a commit to branch master
in repository samba.

commit 73b6d0c81d4929d7543b6645e11a1517686edac7
Author: Steve Langasek <vorlon at debian.org>
Date:   Sun Nov 24 19:08:33 2013 -0800

    Move update-alternatives upgrade removal handling to the postinst, where it belongs.  Closes: 730090.
---
 debian/changelog                                             |  7 +++++++
 debian/{samba-common-bin.prerm => samba-common-bin.postinst} |  2 +-
 debian/samba.postinst                                        |  4 ++++
 debian/samba.prerm                                           | 11 -----------
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 55eaf7e..e013606 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+samba (2:4.0.12+dfsg-2) UNRELEASED; urgency=low
+
+  * Move update-alternatives upgrade removal handling to the postinst, where
+    it belongs.  Closes: #730090.
+
+ -- Steve Langasek <vorlon at debian.org>  Sun, 24 Nov 2013 19:06:20 -0800
+
 samba (2:4.0.12+dfsg-1) unstable; urgency=low
 
   [ Ivo De Decker ]
diff --git a/debian/samba-common-bin.prerm b/debian/samba-common-bin.postinst
similarity index 79%
rename from debian/samba-common-bin.prerm
rename to debian/samba-common-bin.postinst
index 40f5553..f4a9efd 100644
--- a/debian/samba-common-bin.prerm
+++ b/debian/samba-common-bin.postinst
@@ -2,7 +2,7 @@
 
 set -e 
 
-if test "x$1" = "xupgrade" ; then
+if dpkg --compare-versions "$2" lt-nl 2:4.0.12+dfsg-2~; then
 	update-alternatives --remove-all nmblookup /usr/bin/nmblookup.samba3
 	update-alternatives --remove-all net /usr/bin/net.samba3
 	update-alternatives --remove-all testparm /usr/bin/testparm.samba3
diff --git a/debian/samba.postinst b/debian/samba.postinst
index 60ae5a8..ceb437f 100644
--- a/debian/samba.postinst
+++ b/debian/samba.postinst
@@ -39,6 +39,10 @@ if dpkg --compare-versions "$2" lt-nl 2:3.6.15-2; then
 	fi
 fi
 
+if dpkg --compare-versions "$2" lt-nl 2:4.0.12+dfsg-2~; then
+	update-alternatives --remove smbstatus /usr/bin/smbstatus.samba3
+fi
+
 # add the sambashare group
 if ! getent group sambashare > /dev/null 2>&1
 then
diff --git a/debian/samba.prerm b/debian/samba.prerm
deleted file mode 100644
index a8f0d4b..0000000
--- a/debian/samba.prerm
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-set -e 
-
-if test "x$1" = "xupgrade"; then
-	update-alternatives --remove smbstatus /usr/bin/smbstatus.samba3
-fi
-
-#DEBHELPER#
-
-exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list