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

lintian: r1157 - in trunk: checks debian testset/binary/debian



Author: rra
Date: 2008-02-03 21:33:59 +0100 (Sun, 03 Feb 2008)
New Revision: 1157

Added:
   trunk/testset/binary/debian/templates
Modified:
   trunk/checks/po-debconf
   trunk/debian/changelog
Log:
* checks/po-debconf:
  + [RA] Exclude from not-using-po-debconf template files with only the
    shared templates used for coordination with dictionaries-common.
    Thanks, Thomas Bushnell BSG.  (Closes: #460731)

Modified: trunk/checks/po-debconf
===================================================================
--- trunk/checks/po-debconf	2008-02-03 20:07:42 UTC (rev 1156)
+++ trunk/checks/po-debconf	2008-02-03 20:33:59 UTC (rev 1157)
@@ -28,7 +28,9 @@
 my $pkg = shift;
 my $type = shift;
 
-# First, check wether this package seems to use debconf but not po-debconf
+# First, check wether this package seems to use debconf but not po-debconf.
+# Read the templates file and look at the template names it provides, since
+# some shared templates aren't translated.
 opendir(DEB, 'debfiles')
 	or fail("Can't open debfiles directory.");
 my $has_template = my $has_depends = my $has_config = 0;
@@ -36,7 +38,6 @@
 for my $file (readdir(DEB)) {
 	next if -d "debfiles/$file";
 	if ($file =~ m/^(.+\.)?templates(\..+)?$/) {
-	        $has_template = 1;
 		if ($file =~ m/templates\.\w\w(_\w\w)?$/) {
 			push (@lang_templates, $file);
 		} else {
@@ -44,7 +45,13 @@
 				or fail("Can't open debfiles/$file file.");
 			while (<PO>) {
 				tag "translated-default-field", "$file: $."
-					if (m/^_Default(Choice)?: [^[]*$/);
+					if (m/^_Default(Choice)?: [^\[]*$/);
+				if (/^Template: (\S+)/i) {
+					my $template = $1;
+					next if $template =~ m,^shared/packages-(wordlist|ispell)$,;
+					next if $template =~ m,/languages$,;
+					$has_template = 1;
+				}
 			}
 			close PO;
 		}

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-02-03 20:07:42 UTC (rev 1156)
+++ trunk/debian/changelog	2008-02-03 20:33:59 UTC (rev 1157)
@@ -43,6 +43,10 @@
   * checks/menus:
     + [RA] Don't issue unknown-interpreter for maintainer scripts with
       weird interpreters.
+  * checks/po-debconf:
+    + [RA] Exclude from not-using-po-debconf template files with only the
+      shared templates used for coordination with dictionaries-common.
+      Thanks, Thomas Bushnell BSG.  (Closes: #460731)
   * checks/rules.desc:
     + [RA] To fix an ignores-make-clean-error, suggest removing "-" for
       static makefiles.  Thanks, Andrea Colangelo.  (Closes: #458164)

Added: trunk/testset/binary/debian/templates
===================================================================
--- trunk/testset/binary/debian/templates	                        (rev 0)
+++ trunk/testset/binary/debian/templates	2008-02-03 20:33:59 UTC (rev 1157)
@@ -0,0 +1,16 @@
+# The debconf templates defined here are the sort that you'd use if
+# providing a wordlist and an ispell dictionary for the language
+# "perl".  This shouldn't trigger warnings about not using debconf-po.
+
+Template: shared/packages-ispell
+Type: text
+Description:
+
+Template: shared/packages-wordlist
+Type: text
+Description:
+
+Template: miscfiles/languages
+Type: text
+Default: perl (Pathologically Eclectic Rubbish Lister)
+Description:


Reply to: