Your message dated Sun, 19 Jun 2016 15:50:43 +0000 with message-id <eed3f2eb-1172-3764-335b-1fa9bdbf030c@thykier.net> and subject line Re: Bug#540484: lintian: new check + tag: desktop-entry-missing-recommended-key has caused the Debian Bug report #540484, regarding [checks/menu-format] warn unless StartupNotification is set in .desktop to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 540484: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540484 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: lintian: new check + tag: desktop-entry-missing-recommended-key
- From: Ben Finney <ben+debian@benfinney.id.au>
- Date: Sat, 8 Aug 2009 20:55:31 +1000
- Message-id: <20090808105526.GA25821@benfinney.id.au>
- Mail-followup-to: Ben Finney <ben+debian@benfinney.id.au>, Debian Bug Tracking System <submit@bugs.debian.org>
Package: lintian Version: 2.2.13 Severity: wishlist Tags: patch As discussed in the ‘debian-desktop’ forum (thread starting at <URL:http://lists.debian.org/msgid-search/877hxekgo4.fsf@benfinney.id.au>), I think there is a class of desktop entry keys which, while not required by the specification, are usually a problem if omitted. The attached patch implements a check for recommended keys (and only defines one, the ‘StartupNotify’ key) and if they are omitted issues the ‘desktop-entry-missing-recommended-key’ tag. -- \ “Writing a book is like washing an elephant: there no good | `\ place to begin or end, and it's hard to keep track of what | _o__) you've already covered.” —anonymous | Ben Finney <ben@benfinney.id.au>diff --git a/checks/menu-format b/checks/menu-format index 981e5d5..0a36ca8 100644 --- a/checks/menu-format +++ b/checks/menu-format @@ -133,7 +133,7 @@ my @sections = ('Applications/Accessibility', # Authorative source of desktop keys: # http://standards.freedesktop.org/desktop-entry-spec/1.0/ # -# This is a list of all keys that should be in every desktop entry. +# This is a list of all keys that must be in every desktop entry. my @req_desktop_keys = qw(Type Name); # This is a list of all known keys. @@ -797,13 +797,20 @@ sub VerifyDesktopFile { tag @$pending; } - # Test for important keys. + # Test for required keys. for my $tag (@req_desktop_keys) { unless (defined $vals{$tag}) { tag "desktop-entry-missing-required-key", "/$file $tag"; } } + # Test for recommended keys. + for my $tag (@recommended_desktop_keys) { + unless (defined $vals{$tag}) { + tag "desktop-entry-missing-recommended-key", "/$file $tag"; + } + } + # Only test whether the binary is in the package if the desktop file is # directly under /usr/share/applications. Too many applications use # desktop files for other purposes with custom paths. diff --git a/checks/menu-format.desc b/checks/menu-format.desc index 416123f..5b534de 100644 --- a/checks/menu-format.desc +++ b/checks/menu-format.desc @@ -248,6 +248,20 @@ Certainty: certain Info: Desktop entries must contain, at a minimum, the keys Type and Name. Ref: http://standards.freedesktop.org/desktop-entry-spec/1.0/ar01s05.html +Tag: desktop-entry-missing-recommended-key +Severity: normal +Certainty: certain +Info: The desktop entry omits a key that, while not strictly required, + is recommended to be present in each entry with an explicitly + specified value. + . + For backward compatibility with very old desktop entries, the absence + of a StartupNotify key is not an error, but the default behaviour in + its absence is implementation-defined according to the FreeDesktop + specification. The desktop entry for any currently-maintained program + should specify an appropriate value for the StartupEntry key. +Ref: http://standards.freedesktop.org/desktop-entry-spec/1.0/ar01s05.html + Tag: desktop-entry-contains-unknown-key Severity: minor Certainty: certain diff --git a/testset/binary/debian/goodbye.desktop b/testset/binary/debian/goodbye.desktop index f6ce8e3..857d8af 100644 --- a/testset/binary/debian/goodbye.desktop +++ b/testset/binary/debian/goodbye.desktop @@ -7,7 +7,9 @@ Exec=goodbye icon=hello Terminal=true Type=Application +# StartupNotify=true Categories=WeirdStuff;Screensaver; Encoding=ISO-10646-1 [Other Entry] Name=Goodbye +StartupNotify=false diff --git a/testset/binary/debian/hello.desktop b/testset/binary/debian/hello.desktop index f795468..4757fa2 100644 --- a/testset/binary/debian/hello.desktop +++ b/testset/binary/debian/hello.desktop @@ -9,6 +9,7 @@ Exec=kdesu hello Icon=hello Terminal=true Type=Application +StartupNotify=true Categories=GNOME;GTK;System;Applet;X-Foo;Settings; Encoding=UTF-8 OnlyShowIn=GNOME; diff --git a/testset/tags.binary b/testset/tags.binary index 7be45d7..89b39a6 100644 --- a/testset/tags.binary +++ b/testset/tags.binary @@ -80,6 +80,7 @@ W: binary: desktop-entry-contains-unknown-key /usr/share/applications/goodbye.de W: binary: desktop-entry-contains-unknown-key /usr/share/applications/goodbye.desktop:7 icon W: binary: desktop-entry-file-has-crs /usr/share/applications/hello.desktop:7 W: binary: desktop-entry-invalid-category WeirdStuff /usr/share/applications/goodbye.desktop +W: binary: desktop-entry-missing-recommended-key /usr/share/applications/goodbye.desktop StartupNotify W: binary: desktop-entry-uses-reserved-category Screensaver /usr/share/applications/goodbye.desktop W: binary: doc-base-abstract-field-separator-extra-whitespaces binary:7 W: binary: doc-base-file-unknown-format binary:20 espAttachment: signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
- To: 540484-done@bugs.debian.org
- Subject: Re: Bug#540484: lintian: new check + tag: desktop-entry-missing-recommended-key
- From: Niels Thykier <niels@thykier.net>
- Date: Sun, 19 Jun 2016 15:50:43 +0000
- Message-id: <eed3f2eb-1172-3764-335b-1fa9bdbf030c@thykier.net>
- In-reply-to: <523B09E5.2000503@thykier.net>
- References: <523B09E5.2000503@thykier.net> <523B09E5.2000503@thykier.net>
On Thu, 19 Sep 2013 16:27:49 +0200 Niels Thykier <niels@thykier.net> wrote: > Hi Ben and Sune, > > Revisiting #540484, I noticed that it has been without any updates for > the past 4 years while being tagged moreinfo. I am not sure if any of > the views have changed in the past 4 years, but if they haven't I would > suggest we bring this topic to a wider or wiser audience[1]. > > For now, I will be conservative and not implement the tag (if only > because it is less work for me). > > ~Niels > > [1] debian-devel@l.d.o or maybe ask the tech-ctte for advise (Which one > is the wider and which is the wiser is left as an exercise to the reader). > > > No updates and still tagged moreinfo; closing it. Thanks, ~Niels
--- End Message ---