[SCM] Debian package checker branch, master, updated. 2.2.9-19-g06aab95
The following commit has been merged in the master branch:
commit 06aab959ecd1b0961ca5c0d856c8dae2b5ae5a1f
Author: Russ Allbery <rra@debian.org>
Date: Sun Apr 26 21:33:40 2009 -0700
Remove desktop-mimetype-without-update-call
* checks/menu-format{,.desc}:
+ [RA] Remove desktop-mimetype-without-update-call. This is now
handled by triggers. Thanks, Chow Loong Jin. (Closes: #525133)
diff --git a/checks/menu-format b/checks/menu-format
index b5e2842..981e5d5 100644
--- a/checks/menu-format
+++ b/checks/menu-format
@@ -384,9 +384,6 @@ my $pkg = shift;
my $type = shift;
my $info = shift;
-# Whether the postinst script calls update-desktop-database.
-my $postinst_calls_update;
-
my @menufiles;
opendir (MENUDIR, "menu/lib") or fail("cannot read menu/lib file directory.");
push @menufiles, map { "menu/lib/$_" } readdir(MENUDIR);
@@ -415,24 +412,9 @@ foreach my $file (sort keys %{$info->index}) {
}
}
-# If we saw any desktop files, we may want to know whether postinst calls
-# update-desktop-database.
-if (@desktop_files) {
- $postinst_calls_update = 0;
- if (open(IN, '<', "control/postinst")) {
- local $_;
- while (<IN>) {
- next if /^\s*\#/;
- $postinst_calls_update = 1 if /\bupdate-desktop-database\b/;
- }
- }
- close IN;
-}
-
# Verify all the desktop files.
for my $desktop_file (@desktop_files) {
- VerifyDesktopFile($desktop_file, $desktop_file, $pkg, $info,
- $postinst_calls_update);
+ VerifyDesktopFile($desktop_file, $desktop_file, $pkg, $info);
}
# Now all the menu files.
@@ -754,7 +736,7 @@ parse_error:
# Syntax-checks a .desktop file.
sub VerifyDesktopFile {
- my ($desktopfile, $file, $pkg, $info, $postinst_calls_update) = @_;
+ my ($desktopfile, $file, $pkg, $info) = @_;
my %vals;
open (DESKTOP, '<', "unpacked/$file")
or fail("cannot open desktop file $file: $!");
@@ -855,12 +837,6 @@ sub VerifyDesktopFile {
tag "desktop-entry-lacks-main-category", "/$file";
}
}
-
- # If there is a MimeType key, the package should call
- # update-desktop-database in the postinst.
- if ($vals{'MimeType'} and not $postinst_calls_update) {
- tag "desktop-mimetype-without-update-call", "/$file";
- }
}
# Verify whether a command is shipped as part of the package. Takes the full
diff --git a/checks/menu-format.desc b/checks/menu-format.desc
index 70e739a..c5578f4 100644
--- a/checks/menu-format.desc
+++ b/checks/menu-format.desc
@@ -331,17 +331,3 @@ Info: kdelnk files were used by KDE 1 and since KDE 2 desktop files are used
instead. Renaming the file and removing the deprecated header and keys
is often all that needs to be done.
Ref: http://standards.freedesktop.org/desktop-entry-spec/1.0/apc.html
-
-Tag: desktop-mimetype-without-update-call
-Severity: minor
-Certainty: certain
-Info: Your package installs a .desktop file which contains a
- <tt>MimeType</tt> setting, but it doesn't call
- <tt>update-desktop-database</tt> in the package <tt>postinst</tt>
- maintainer script. This program updates the MIME type cache and should
- be called whenever installing a package with a new <tt>MimeType</tt>
- registration.
- .
- If you are using debhelper, you can add the necessary fragment to your
- <tt>postinst</tt> by calling <tt>dh_desktop</tt> in
- <tt>debian/rules</tt>.
diff --git a/debian/changelog b/debian/changelog
index 677a5e8..146ee7b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ lintian (2.2.10) UNRELEASED; urgency=low
* Summary of tag changes:
+ Removed:
+ - desktop-mimetype-without-update-call
- package-uses-breaks
* checks/fields{,.desc}:
@@ -11,6 +12,9 @@ lintian (2.2.10) UNRELEASED; urgency=low
+ [ADB] Anchor the regular expression for the "gz-file-not-gzip" tag so
that files with names that contain ".gz" but do not end in that string
are not flagged. Patch by Raphael Geissert. (Closes: #523352)
+ * checks/menu-format{,.desc}:
+ + [RA] Remove desktop-mimetype-without-update-call. This is now
+ handled by triggers. Thanks, Chow Loong Jin. (Closes: #525133)
* checks/scripts:
+ [RA] Handle command delimiters, $() expressions, and braces and
parentheses in the checks for correct diversion handling. Patch
diff --git a/t/tests/menu-format-desktop-mimetype/desc b/t/tests/menu-format-desktop-mimetype/desc
index dd1e8dc..6a61d55 100644
--- a/t/tests/menu-format-desktop-mimetype/desc
+++ b/t/tests/menu-format-desktop-mimetype/desc
@@ -3,5 +3,4 @@ Sequence: 6000
Version: 1.0
Section: doc
Description: Check update-desktop-database and MimeType *.desktop
-Test-For: desktop-mimetype-without-update-call
-References: Debian Bug#488832
+References: Debian Bug#488832, Debian Bug#525133
diff --git a/t/tests/menu-format-desktop-mimetype/tags b/t/tests/menu-format-desktop-mimetype/tags
index 1f554cd..d77e340 100644
--- a/t/tests/menu-format-desktop-mimetype/tags
+++ b/t/tests/menu-format-desktop-mimetype/tags
@@ -1,2 +1 @@
W: menu-format-desktop-mimetype source: maintainer-script-lacks-debhelper-token debian/postinst
-W: menu-format-desktop-mimetype: desktop-mimetype-without-update-call /usr/share/applications/foo.desktop
--
Debian package checker
Reply to: