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

lintian: r393 - in trunk: checks debian



Author: he
Date: 2004-12-26 13:23:26 +0100 (Sun, 26 Dec 2004)
New Revision: 393

Modified:
   trunk/checks/files
   trunk/checks/files.desc
   trunk/debian/changelog
Log:
* checks/files:
 + [HE] Check that .desktop files are placed in /usr/share/applications.
   This seems to be the standard place for those files that are used
   to create menus. The check is called desktop-file-in-wrong-dir. 
   (Closes: #200171)



Modified: trunk/checks/files
===================================================================
--- trunk/checks/files	2004-12-25 19:16:59 UTC (rev 392)
+++ trunk/checks/files	2004-12-26 12:23:26 UTC (rev 393)
@@ -306,6 +306,22 @@
 	    # Make an exception for the altdev dirs, which will go away
 	    # at some point and are not worth moving.
 	}
+	# ---------------- .desktop files
+	# People have placed them everywhere, but nowadays the consensus 
+	# seems to be to stick to the fd.org standard drafts, which says
+	# that .desktop files intended for menus should be placed in 
+	# $XDG_DATA_DIRS/applications.
+	# The default for $XDG_DATA_DIRS is /usr/local/share/:/usr/share/,
+	# according to the basedir-spec on fd.org. As distributor, we 
+	# should only allow /usr/share.
+	#
+	# Other applications also use .desktop files (yay!), so we need to
+	# exclude them.
+	elsif ($file =~ m,\.desktop$, && $file !~ m,^usr/share/applications/ &&
+	       $file !~ m,^usr/share/xsessions/,) {
+	    tag "desktop-file-in-wrong-dir", "$file";
+	}
+	
     }
     # ---------------- /var subdirs
     elsif ($type ne 'udeb' and $file =~ m,^var/[^/]+/$,) { # FSSTND dirs

Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc	2004-12-25 19:16:59 UTC (rev 392)
+++ trunk/checks/files.desc	2004-12-26 12:23:26 UTC (rev 393)
@@ -509,3 +509,10 @@
  most likely be removed.  If it contains information that pertains to 
  Debian, please consider renaming it, or including it in an already 
  existing README file.
+
+Tag: desktop-file-in-wrong-dir
+Type: warning
+Info: package contains a .desktop file in a non-standard directory.
+ According to the menu-spec draft on freedesktop.org, those .desktop
+ files that are intended to create a menu should be placed in 
+ <tt>/usr/share/applications/</tt>.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-12-25 19:16:59 UTC (rev 392)
+++ trunk/debian/changelog	2004-12-26 12:23:26 UTC (rev 393)
@@ -11,7 +11,12 @@
       a binary NMU. New check's name is binary-nmu-debian-revision-in-source.
       (Closes: #244830)
     + [HE] Warn if people use the Bugs field to refer to the Debian BTS, the
-      new check is called redundant-bugs-field. (Closes: #245883)      
+      new check is called redundant-bugs-field. (Closes: #245883)
+  * checks/files:
+    + [HE] Check that .desktop files are placed in /usr/share/applications.
+      This seems to be the standard place for those files that are used
+      to create menus. The check is called desktop-file-in-wrong-dir. 
+      (Closes: #200171)
   * checks/manpages:
     + [HE] Don't compare the manpage filename extension and the content of
       .TH case-sensitive. Report + patch by Jay Berkenbilt <ejb@ql.org>,



Reply to: