summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2016-01-06 07:20:32 +0000
committerNiels Thykier <niels@thykier.net>2016-01-06 07:20:32 +0000
commitbd3ab8767f07f5bc1a6d35316d8922333ce043dc (patch)
tree0f9fd452f44fe7fc621819ed3bac35227ad326ea
parenta88e4f7901e6f416afe1167ace57f8d6f79ed59e (diff)
downloaddebhelper-bd3ab8767f07f5bc1a6d35316d8922333ce043dc.tar.gz
Revert "dh_installmenu: Remove unncessary snippets for menu files"
This reverts commit a88e4f7901e6f416afe1167ace57f8d6f79ed59e. We still need the snippet for /executable/ menu files.
-rw-r--r--autoscripts/postinst-menu3
-rw-r--r--autoscripts/postrm-menu1
-rw-r--r--debian/changelog4
-rwxr-xr-xdh_installmenu7
4 files changed, 12 insertions, 3 deletions
diff --git a/autoscripts/postinst-menu b/autoscripts/postinst-menu
new file mode 100644
index 00000000..b56a3462
--- /dev/null
+++ b/autoscripts/postinst-menu
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
+ update-menus
+fi
diff --git a/autoscripts/postrm-menu b/autoscripts/postrm-menu
new file mode 100644
index 00000000..a180558d
--- /dev/null
+++ b/autoscripts/postrm-menu
@@ -0,0 +1 @@
+if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
diff --git a/debian/changelog b/debian/changelog
index c72b5c82..144365e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,9 +7,7 @@ debhelper (9.20151225+unreleased) UNRELEASED; urgency=medium
* dh_install: Only fallback to debian/tmp if the given glob
does not start with debian/tmp. This should make the
output on failures less weird.
- * autoscripts: Remove unused snippets.
- * dh_installmenu: Stop adding script snippets when installing
- menu files. These are handled by a trigger now.
+ * autoscripts/*-makeshlibs: Removed, no longer used.
[ Dmitry Shachnev ]
* dh_install: Fail because of missing files only after processing
diff --git a/dh_installmenu b/dh_installmenu
index a3084c60..adca9d6e 100755
--- a/dh_installmenu
+++ b/dh_installmenu
@@ -65,6 +65,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
install_dir("$tmp/usr/share/menu");
}
install_file($menu,"$tmp/usr/share/menu/$package");
+
+ # Add the scripts if a menu-method file doesn't exist.
+ # The scripts for menu-method handle everything these do, too.
+ if ($menu_method eq "" && ! $dh{NOSCRIPTS}) {
+ autoscript($package,"postinst","postinst-menu");
+ autoscript($package,"postrm","postrm-menu")
+ }
}
if ($menu_method ne '') {