[Pkg-wmaker-commits] [wmaker] 01/04: Handle removal of menu-methods and generated menus.

Andreas Metzler ametzler at moszumanska.debian.org
Mon Aug 7 12:47:56 UTC 2017


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

ametzler pushed a commit to branch master
in repository wmaker.

commit 5c84b57382339d10c7b73612f74d32199534aa89
Author: Andreas Metzler <ametzler at bebt.de>
Date:   Sat Jul 29 13:44:18 2017 +0200

    Handle removal of menu-methods and generated menus.
    
    On upgrades remove menu-methods (orphaned conffiles) with
    debian/wmaker{,-common}.maintscript. Remove generated menufiles
    (etc/GNUstep/Defaults/appearance.menu and /etc/GNUstep/Defaults/menu.hook
    on upgrades (only if they are autogenerated) and purge.
---
 debian/changelog                 |  7 +++++++
 debian/wmaker-common.maintscript |  1 +
 debian/wmaker-common.postinst    | 14 ++++++++++++++
 debian/wmaker-common.postrm      |  6 ++++++
 debian/wmaker.maintscript        |  1 +
 debian/wmaker.postinst           | 14 ++++++++++++++
 debian/wmaker.postrm             |  6 ++++++
 7 files changed, 49 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c85f468..0df59be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 wmaker (0.95.8-2) UNRELEASED; urgency=medium
 
+  [ Doug Torrance ]
   * Remove and replace the deprecated Debian menu.  The list of
     applications is now generated by the wmmenugen utility (with some
     patches from upstream's development branch) from .desktop files in
@@ -18,6 +19,12 @@ wmaker (0.95.8-2) UNRELEASED; urgency=medium
   * Remove explicit call to dh_autoreconf; enabled by default in
     debhelper 10.
 
+  [ Andreas Metzler ]
+  * Handle removal of menu-methods on upgrades (orphaned conffiles) with
+    debian/wmaker{,-common}.maintscript. Remove generated menufiles
+    (etc/GNUstep/Defaults/appearance.menu and /etc/GNUstep/Defaults/menu.hook
+    on upgrades and purge.
+
  -- Doug Torrance <dtorrance at piedmont.edu>  Mon, 24 Jul 2017 22:34:23 -0400
 
 wmaker (0.95.8-1) unstable; urgency=low
diff --git a/debian/wmaker-common.maintscript b/debian/wmaker-common.maintscript
index 5fece82..0aad655 100644
--- a/debian/wmaker-common.maintscript
+++ b/debian/wmaker-common.maintscript
@@ -3,3 +3,4 @@ mv_conffile /etc/X11/WindowMaker/wmmacros /usr/share/WindowMaker/wmmacros 0.95.7
 rm_conffile /etc/X11/WindowMaker/appearance.menu 0.95.7-5~
 rm_conffile /etc/X11/WindowMaker/menu.posthook 0.95.7-5~
 rm_conffile /etc/X11/WindowMaker/menu.prehook 0.95.7-5~
+rm_conffile /etc/menu-methods/wmappearance 0.95.8-2~
diff --git a/debian/wmaker-common.postinst b/debian/wmaker-common.postinst
new file mode 100644
index 0000000..b0b22b6
--- /dev/null
+++ b/debian/wmaker-common.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+#DEBHELPER#
+
+# run after debhelper code, which removes menu-methods.
+if [ "$1" = "configure" ] &&
+	[ x"$2" != "x" ] && 
+	test -e /etc/GNUstep/Defaults/appearance.menu &&
+	dpkg --compare-versions "$2" '<<' '0.95.8-2~' ; then
+	if head -n1 /etc/GNUstep/Defaults/appearance.menu |
+	grep -q 'Automatically generated file. Do not edit.' ; then
+		rm /etc/GNUstep/Defaults/appearance.menu
+	fi
+fi
diff --git a/debian/wmaker-common.postrm b/debian/wmaker-common.postrm
new file mode 100644
index 0000000..49ecaec
--- /dev/null
+++ b/debian/wmaker-common.postrm
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+if [ "$1" = "purge" ] && test -e /etc/GNUstep/Defaults/appearance.menu ; then
+	rm /etc/GNUstep/Defaults/appearance.menu
+fi
+#DEBHELPER#
diff --git a/debian/wmaker.maintscript b/debian/wmaker.maintscript
new file mode 100644
index 0000000..28ce643
--- /dev/null
+++ b/debian/wmaker.maintscript
@@ -0,0 +1 @@
+rm_conffile /etc/menu-methods/wmaker 0.95.8-2~
diff --git a/debian/wmaker.postinst b/debian/wmaker.postinst
new file mode 100644
index 0000000..1ef49c2
--- /dev/null
+++ b/debian/wmaker.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+#DEBHELPER#
+
+# run after debhelper code, which removes menu-methods.
+if [ "$1" = "configure" ] &&
+	[ x"$2" != "x" ] && 
+	test -e /etc/GNUstep/Defaults/menu.hook &&
+	dpkg --compare-versions "$2" '<<' '0.95.8-2~' ; then
+	if head -n1 /etc/GNUstep/Defaults/menu.hook |
+	grep -q 'Automatically generated file. Do not edit' ; then
+		rm /etc/GNUstep/Defaults/menu.hook
+	fi
+fi
diff --git a/debian/wmaker.postrm b/debian/wmaker.postrm
new file mode 100644
index 0000000..2671a52
--- /dev/null
+++ b/debian/wmaker.postrm
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+if [ "$1" = "purge" ] && test -e /etc/GNUstep/Defaults/menu.hook ; then
+	rm /etc/GNUstep/Defaults/menu.hook
+fi
+#DEBHELPER#

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



More information about the Pkg-wmaker-commits mailing list