[debhelper-devel] [debhelper] 02/02: dh_installmenu: Stop installing menu files in compat 11

Niels Thykier nthykier at moszumanska.debian.org
Sun Jun 19 06:57:13 UTC 2016


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

nthykier pushed a commit to branch master
in repository debhelper.

commit c1f102537e9e204deed0eab17c10680f3372a2ba
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Jun 19 06:56:09 2016 +0000

    dh_installmenu: Stop installing menu files in compat 11
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debhelper.pod    |  5 +++++
 debian/changelog |  2 ++
 dh_installmenu   | 28 ++++++++++++++++++----------
 3 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/debhelper.pod b/debhelper.pod
index 2d27015..f16841d 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -564,6 +564,11 @@ Changes from v10 are:
 
 =over 8
 
+=item -
+
+B<dh_installmenu> no longer installs F<menu> files.  The
+F<menu-method> files are still installed.
+
 =back
 
 =head1 NOTES
diff --git a/debian/changelog b/debian/changelog
index dbfa2a4..b287f72 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 debhelper (9.20160618.1+unreleased) UNRELEASED; urgency=medium
 
   * Start on compat 11.
+  * dh_installmenu: Stop installing menu files in compat 11
+    (menu-methods are still installed).
 
  -- Niels Thykier <niels at thykier.net>  Sat, 18 Jun 2016 21:10:26 +0000
 
diff --git a/dh_installmenu b/dh_installmenu
index adca9d6..ba69905 100755
--- a/dh_installmenu
+++ b/dh_installmenu
@@ -29,6 +29,9 @@ the maintainer scripts by L<dh_installdeb(1)>.
 
 =item debian/I<package>.menu
 
+In compat 11, this file is no longer installed the format has been
+deprecated.  Please migrate to a desktop file instead.
+
 Debian menu files, installed into usr/share/menu/I<package> in the package
 build directory. See L<menufile(5)> for its format.
 
@@ -61,16 +64,21 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 	my $menu_method=pkgfile($package,"menu-method");
 	
 	if ($menu ne '') {
-		if (! -d "$tmp/usr/share/menu") {
-			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 (compat(10)) {
+			if (! -d "$tmp/usr/share/menu") {
+				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")
+			}
+		} else {
+			warning("menu files are *not* installed in compat 11");
+			warning("Please remove the menu file");
 		}
 	}
 

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




More information about the debhelper-devel mailing list