Author: rra Date: 2007-10-15 04:26:33 +0200 (Mon, 15 Oct 2007) New Revision: 965
Modified: trunk/checks/menu-format trunk/checks/menu-format.desc trunk/debian/changelog trunk/testset/binary/debian/goodbye.desktop trunk/testset/binary/debian/hello.desktop trunk/testset/tags.binary Log: * checks/menu-format{.desc,}: + [RA] Reserved categories are okay in .desktop files if OnlyShowIn is present, and generally deserve their own separate tag regardless. Thanks, Michael Biebl. (Closes: #442709) Modified: trunk/checks/menu-format =================================================================== --- trunk/checks/menu-format 2007-10-15 02:11:29 UTC (rev 964) +++ trunk/checks/menu-format 2007-10-15 02:26:33 UTC (rev 965) @@ -339,6 +339,17 @@ ConsoleOnly ); +# This is a list of Reserved Categories for .desktop files. To use one of +# these, the desktop entry must also have an OnlyShowIn key limiting the +# environment to one that supports this category. +my %reserved_categories = map { $_ => 1 } + qw( + Screensaver + TrayIcon + Applet + Shell + ); + # Path in which to search for binaries referenced in menu entries. my @path = qw(/usr/local/bin/ /usr/bin/ /bin/ /usr/X11R6/bin/ /usr/games/); @@ -771,7 +782,10 @@ my @cats = split (';', $vals{'Categories'}); my $saw_main; for my $cat (@cats) { - if (not $categories{$cat} and not $main_categories{$cat}) { + if ($reserved_categories{$cat}) { + tag "desktop-entry-uses-reserved-category", "$cat $file" + unless $vals{'OnlyShowIn'}; + } elsif (not $categories{$cat} and not $main_categories{$cat}) { tag "desktop-entry-invalid-category", "$cat $file"; } elsif ($main_categories{$cat}) { $saw_main = 1; Modified: trunk/checks/menu-format.desc =================================================================== --- trunk/checks/menu-format.desc 2007-10-15 02:11:29 UTC (rev 964) +++ trunk/checks/menu-format.desc 2007-10-15 02:26:33 UTC (rev 965) @@ -231,6 +231,15 @@ only be used on conjunction with one or more Main Categories. Ref: http://standards.freedesktop.org/menu-spec/1.0/apa.html +Tag: desktop-entry-uses-reserved-category +Type: warning +Info: This desktop entry includes a Reserved Category, one which has a + desktop-specific meaning that has not yet been standardized, but does not + include an OnlyShowIn key. Desktop entries using a Reserved Category + must include an OnlyShowIn key limiting the entry to those environments + that support the category. +Ref: http://standards.freedesktop.org/menu-spec/1.0/apa.html + Tag: desktop-entry-invalid-category Type: warning Info: This desktop entry lists a category that is not one of the Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2007-10-15 02:11:29 UTC (rev 964) +++ trunk/debian/changelog 2007-10-15 02:26:33 UTC (rev 965) @@ -41,6 +41,10 @@ + [RA] Emacs 22 now allows embedded images in info files, so accept and ignore PNG files in the info directory. More image types may be needed. Thanks, Andreas Metzler. (Closes: #438602) + * checks/menu-format{.desc,}: + + [RA] Reserved categories are okay in .desktop files if OnlyShowIn is + present, and generally deserve their own separate tag regardless. + Thanks, Michael Biebl. (Closes: #442709) * checks/nmu.desc: + [RA] Remove obsolete note about binary NMUs. Patch from Thijs Kinkhorst. (Closes: #437925) @@ -53,7 +57,7 @@ * collection/changelog-file{.desc,}: + [RA] Collect NEWS.Debian as well as changelog. - -- Russ Allbery <[EMAIL PROTECTED]> Sun, 14 Oct 2007 19:11:25 -0700 + -- Russ Allbery <[EMAIL PROTECTED]> Sun, 14 Oct 2007 19:24:56 -0700 lintian (1.23.34) unstable; urgency=low Modified: trunk/testset/binary/debian/goodbye.desktop =================================================================== --- trunk/testset/binary/debian/goodbye.desktop 2007-10-15 02:11:29 UTC (rev 964) +++ trunk/testset/binary/debian/goodbye.desktop 2007-10-15 02:26:33 UTC (rev 965) @@ -7,7 +7,7 @@ icon=hello Terminal=true Type=Application -Categories=WeirdStuff; +Categories=WeirdStuff;Screensaver; Encoding=ISO-10646-1 [Other Entry] Name=Goodbye Modified: trunk/testset/binary/debian/hello.desktop =================================================================== --- trunk/testset/binary/debian/hello.desktop 2007-10-15 02:11:29 UTC (rev 964) +++ trunk/testset/binary/debian/hello.desktop 2007-10-15 02:26:33 UTC (rev 965) @@ -9,5 +9,6 @@ Icon=hello Terminal=true Type=Application -Categories=GNOME;GTK;System;Settings; +Categories=GNOME;GTK;System;Applet;Settings; Encoding=UTF-8 +OnlyShowIn=GNOME; Modified: trunk/testset/tags.binary =================================================================== --- trunk/testset/tags.binary 2007-10-15 02:11:29 UTC (rev 964) +++ trunk/testset/tags.binary 2007-10-15 02:26:33 UTC (rev 965) @@ -60,6 +60,7 @@ W: binary: desktop-entry-contains-unknown-key ./usr/share/applications/goodbye.desktop:7 icon W: binary: desktop-entry-invalid-category WeirdStuff ./usr/share/applications/goodbye.desktop W: binary: desktop-entry-lacks-main-category ./usr/share/applications/goodbye.desktop +W: binary: desktop-entry-uses-reserved-category Screensaver ./usr/share/applications/goodbye.desktop W: binary: doc-base-file-unknown-format binary:16 esp W: binary: executable-not-elf-or-script ./usr/bin/iminusrbin W: binary: executable-not-elf-or-script ./usr/share/applications/goodbye.desktop -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]