Tags: patch

   I believe the attached patch addresses the request, but I suspect
that it would benefit from some additional documentation as well, so
that any future changes to autoscripts/post[inst,rm]-desktop will
actually be applied for .desktop files that don't carry a MimeType
(e.g. most games).

--
Emmet HIKORY
diff -Nru debhelper-5.0.50/dh_desktop debhelper-5.0.50/dh_desktop
--- debhelper-5.0.50/dh_desktop	2006-01-04 10:20:51.000000000 +0900
+++ debhelper-5.0.50/dh_desktop	2007-06-08 10:25:40.000000000 +0900
@@ -32,7 +32,7 @@
 		# usr/share/applications and thus might need
 		# update-desktop-database be called. Other desktop
 		# files don't.
-		my $desktop_files = `find $tmp/usr/share/applications -type f -name \\*.desktop -printf '%p\n'`;
+		my $desktop_files = `find $tmp/usr/share/applications -type f -name \\*.desktop -execdir grep -q "^MimeType" '{}' \\; -printf '%p\n'`;
 		if ($desktop_files && ! $dh{NOSCRIPTS}) {
 			autoscript($package,"postinst","postinst-desktop");
 			autoscript($package,"postrm","postrm-desktop");

Reply via email to