[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 1.24.2-67-g7da32ac



The following commit has been merged in the master branch:
commit 7da32ac6db80627f86458f19d7894f40b89a4274
Author: Raphael Geissert <atomo64+debian@gmail.com>
Date:   Sun Aug 3 14:59:11 2008 -0700

    Warn about .kdelnk and KDE Desktop Entry
    
    * checks/menu-format{,.desc}:
      + [RA] Warn about .kdelnk files and [KDE Desktop Entry] headings in
        desktop files.  Patch from Raphael Geissert.

diff --git a/checks/menu-format b/checks/menu-format
index 1b25719..c01cc22 100644
--- a/checks/menu-format
+++ b/checks/menu-format
@@ -405,6 +405,8 @@ foreach my $file (keys %{$info->index}) {
     $file = '/' . $file;
     $file_index{$file} = 1;
 
+    tag 'deprecated-kdelnk-file', $file if ($file =~ m,\.kdelnk$,);
+
     if ($index_info->{type} =~ m/[-h]/ &&
 	$file =~ m,/usr/share/applications/.*\.desktop$,) {
 
@@ -759,8 +761,9 @@ sub VerifyDesktopFile {
         # ignore any keys in other groups.
         last if ($saw_first and $line =~ /^\[(.*)\]\s*$/);
         unless ($saw_first) {
-            return unless $line =~ /^\[Desktop Entry\]\s*$/;
+            return unless $line =~ /^\[(KDE )?Desktop Entry\]\s*$/;
             $saw_first = 1;
+            tag 'desktop-contains-deprecated-header', "$file:$." if ($line =~ /^\[KDE Desktop Entry\]\s*$/);
         }
 
 	# Tag = Value.	For most errors, just add the error to pending rather
diff --git a/checks/menu-format.desc b/checks/menu-format.desc
index d1f6d65..b7845fe 100644
--- a/checks/menu-format.desc
+++ b/checks/menu-format.desc
@@ -270,3 +270,17 @@ Info: The desktop entry specifies a command that is not available in the
  desktop file after the install location of the binary was changed.  A
  desktop file for a command should be included in the same package as that
  command.
+
+Tag: desktop-contains-deprecated-header
+Type: warning
+Info: The header on this line of the desktop entry has been deprecated in the
+ FreeDesktop specification.  If the header is "KDE Desktop Entry", the right
+ fix is normally changing it to "Desktop Entry".
+Ref: http://standards.freedesktop.org/desktop-entry-spec/1.0/apc.html
+
+Tag: deprecated-kdelnk-file
+Type: error
+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
diff --git a/debian/changelog b/debian/changelog
index 7eedd3c..b258b06 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -63,10 +63,12 @@ lintian (1.24.3) unstable; urgency=low
     + [ADB] Update the Policy reference for manpage-has-wrong-extension.
     + [ADB] Use Lintian::Collect rather than parsing the "index" and
       "file-info" files.
-  * checks/menu-format:
+  * checks/menu-format{,.desc}:
     + [ADB] Use Lintian::Collect to parse the list of files in the package.
     + [ADB] Don't raise menu-command-not-in-package for 'sensible-browser'
       or 'sh'.  Thanks Raphael Geissert.
+    + [RA] Warn about .kdelnk files and [KDE Desktop Entry] headings in
+      desktop files.  Patch from Raphael Geissert.
   * checks/menus.desc:
     + [ADB] Fix a typo; thanks Jordà Polo.
   * checks/nmu{,.desc}:
diff --git a/testset/binary/debian/hello.desktop b/testset/binary/debian/hello.desktop
index 4f4a865..f795468 100644
--- a/testset/binary/debian/hello.desktop
+++ b/testset/binary/debian/hello.desktop
@@ -1,7 +1,7 @@
 # some random comment
 
 # [Foo Bar]
-[Desktop Entry]
+[KDE Desktop Entry]
 Name=Hello
 Name[en_US]=Hello
 Comment=Say hello!
diff --git a/testset/binary/debian/rules b/testset/binary/debian/rules
index 33d83f6..9ed885d 100755
--- a/testset/binary/debian/rules
+++ b/testset/binary/debian/rules
@@ -58,6 +58,8 @@ binary-arch: build
 	install -d $(tmp)/usr/share/applications
 	install -m 644 debian/hello.desktop \
 	    $(tmp)/usr/share/applications/hello.desktop
+	install -m 644 debian/hello.desktop \
+	    $(tmp)/usr/share/applications/hello.kdelnk
 	install -m 755 debian/goodbye.desktop \
 	    $(tmp)/usr/share/applications/goodbye.desktop
 
diff --git a/testset/tags.binary b/testset/tags.binary
index 7819d9c..b3f4763 100644
--- a/testset/tags.binary
+++ b/testset/tags.binary
@@ -2,6 +2,7 @@ E: binary source: debian-rules-missing-required-target binary-indep
 E: binary: debian-changelog-file-missing-or-wrong-name
 E: binary: debian-news-file-uses-obsolete-national-encoding at line 3
 E: binary: depends-on-x-metapackage pre-depends: xorg
+E: binary: deprecated-kdelnk-file /usr/share/applications/hello.kdelnk
 E: binary: desktop-entry-missing-required-key /usr/share/applications/goodbye.desktop Name
 E: binary: doc-base-document-field-ends-in-whitespace binary:1
 E: binary: doc-base-file-duplicated-format binary:36 html
@@ -73,6 +74,7 @@ W: binary: debian-copyright-file-uses-obsolete-national-encoding at line 13
 W: binary: debian-news-entry-has-strange-distribution UNRELEASED
 W: binary: description-contains-homepage
 W: binary: desktop-command-not-in-package /usr/share/applications/goodbye.desktop goodbye
+W: binary: desktop-contains-deprecated-header /usr/share/applications/hello.desktop:4
 W: binary: desktop-entry-contains-unknown-key /usr/share/applications/goodbye.desktop:5 SpecialTag
 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

-- 
Debian package checker


Reply to: