summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoeyh <joeyh>2007-09-13 19:12:10 +0000
committerjoeyh <joeyh>2007-09-13 19:12:10 +0000
commit2edd22215ace8da90de46142b3b38896ee0aed72 (patch)
tree20aa5a54b6a0c58aab2b64bfe99d7763ba6b9c0d
parent3202285b8ea76a2ccf4ea6c29e010c4114d5838b (diff)
r2025: * dh_desktop: Only generate calls to update-desktop-database for desktop
files with MimeType fields. Patch from Emmet Hikory. Closes: #427831
-rw-r--r--debian/changelog7
-rwxr-xr-xdh_desktop6
2 files changed, 12 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 739597c0..d0cc7a11 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debhelper (5.0.55) UNRELEASED; urgency=low
+
+ * dh_desktop: Only generate calls to update-desktop-database for desktop
+ files with MimeType fields. Patch from Emmet Hikory. Closes: #427831
+
+ -- Joey Hess <joeyh@debian.org> Thu, 13 Sep 2007 15:11:06 -0400
+
debhelper (5.0.54) unstable; urgency=low
* dh_strip: Man page reference to policy section on DEB_BUILD_OPTIONS.
diff --git a/dh_desktop b/dh_desktop
index 4542fc56..1b32fc99 100755
--- a/dh_desktop
+++ b/dh_desktop
@@ -20,6 +20,10 @@ Currently this program does not handle installation of the files, though it
may do so at a later date. It takes care of adding maintainer script
fragments to call F<update-desktop-database>.
+Note that since F<update-desktop-database> currently only handles mime
+types, as an optimisation, desktop files not containing MimeType fields
+will currently be ignored by dh_desktop.
+
=cut
init();
@@ -32,7 +36,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# 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");