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

[SCM] Debian package checker branch, master, updated. 1.24.4-88-g813a6db



The following commit has been merged in the master branch:
commit d67a5e5f0c3c8f5a4911062f288c408d2e2660e8
Author: Frank Lichtenheld <djpig@debian.org>
Date:   Tue Sep 2 01:44:08 2008 +0200

    checks/menus: Improve some doc-base section tests
    
     + Do not complain if the unknown doc-base section is the subsection
       of a known section.  The doc-base documentation seems to suggest that
       this is o.k.  (Closes: #495836)
     + Issue a special tag if the doc-base section would be valid except
       for a prefixed App(lication)s.

diff --git a/checks/menus b/checks/menus
index d332437..228e4ba 100644
--- a/checks/menus
+++ b/checks/menus
@@ -401,8 +401,17 @@ sub check_doc_base_field {
     } elsif ($field eq 'section') {
 	my $sections = Lintian::Data->new('doc-base/sections');
 	$_ = join (' ', @$vals);
-	tag "doc-base-unknown-section", "$dbfile:$line", $_
-	    unless $sections->known($_);
+	unless ($sections->known($_)) {
+	    if (m;^App(?:lication)?s/(.+)$;
+		and $sections->known($1)) {
+		tag "doc-base-uses-applications-section", "$dbfile:$line", $_;
+	    } elsif (m;^(.+)/([^/]+)$;
+		    and $sections->known($1)) {
+		# allows creating a new subsection to a known section
+	    } else {
+		tag "doc-base-unknown-section", "$dbfile:$line", $_;
+	    }
+	}
 
     # Abstract field.
     } elsif ($field eq 'abstract') {
diff --git a/checks/menus.desc b/checks/menus.desc
index e61d292..b45f453 100644
--- a/checks/menus.desc
+++ b/checks/menus.desc
@@ -391,6 +391,16 @@ Info: doc-base files must be valid UTF-8, an encoding of the Unicode
   $ mv doc-base.new doc-base
 Ref: doc-base 2.3.2
 
+Tag: doc-base-uses-applications-section
+Type: warning
+Severity: normal
+Certainty: certain
+Info: The section indicated in this doc-base control file has a top-level
+ section of Apps or Applications. This section is only used in menu, not
+ in doc-base. Simply removing the top-level section will lead to a valid
+ doc-base section.
+Ref: doc-base 2.3.3
+
 Tag: doc-base-unknown-section
 Type: warning
 Severity: normal
diff --git a/debian/changelog b/debian/changelog
index dd667ef..3b5a251 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,6 +41,12 @@ lintian (2.0.0~rc1) experimental; urgency=low
       exclusive list.  Also fix a spelling mistake.
     + [ADB] Re-add an accidentally removed slash to the check for embedded
       Javascript libraries, removing some false positives.  (Closes: #497215)
+  * checks/menus{,.desc}:
+    + [FL] Do not complain if the unknown doc-base section is the subsection
+      of a known section.  The doc-base documentation seems to suggest that
+      this is o.k.  (Closes: #495836)
+    + [FL] Issue a special tag if the doc-base section would be valid except
+      for a prefixed App(lication)s.
   * checks/scripts:
     + [FL] Change all regular expressions in depends_needed to
       require spaces after the command and not \b. There are
diff --git a/t/tests/6000_menus-doc-base-sections.desc b/t/tests/6000_menus-doc-base-sections.desc
new file mode 100644
index 0000000..1fb0070
--- /dev/null
+++ b/t/tests/6000_menus-doc-base-sections.desc
@@ -0,0 +1,6 @@
+Testname: menus-doc-base-sections
+Version: 1.0
+Description: Test some doc-base section related tags
+Test-Against: doc-base-unknown-section
+Test-For: doc-base-uses-applications-section
+References: Debian Bug#495836
diff --git a/t/tests/menus-doc-base-sections/debian/debian/doc-base.doc1 b/t/tests/menus-doc-base-sections/debian/debian/doc-base.doc1
new file mode 100644
index 0000000..5543eb3
--- /dev/null
+++ b/t/tests/menus-doc-base-sections/debian/debian/doc-base.doc1
@@ -0,0 +1,8 @@
+Document: doc1
+Title: Document 1
+Author: Lintian maintainers
+Abstract: Document 1
+Section: Programming/Something
+
+Format: text
+Files: /usr/share/doc/menus-doc-base-sections/doc1.txt
diff --git a/t/tests/menus-doc-base-sections/debian/debian/doc-base.doc2 b/t/tests/menus-doc-base-sections/debian/debian/doc-base.doc2
new file mode 100644
index 0000000..d7578ad
--- /dev/null
+++ b/t/tests/menus-doc-base-sections/debian/debian/doc-base.doc2
@@ -0,0 +1,8 @@
+Document: doc2
+Title: Document 2
+Author: Lintian maintainers
+Abstract: Document 2
+Section: Apps/Programming
+
+Format: text
+Files: /usr/share/doc/menus-doc-base-sections/doc2.txt
diff --git a/t/tests/menus-doc-base-sections/debian/debian/docs b/t/tests/menus-doc-base-sections/debian/debian/docs
new file mode 100644
index 0000000..d411609
--- /dev/null
+++ b/t/tests/menus-doc-base-sections/debian/debian/docs
@@ -0,0 +1,2 @@
+doc1.txt
+doc2.txt
diff --git a/t/tests/menus-doc-base-sections/debian/doc1.txt b/t/tests/menus-doc-base-sections/debian/doc1.txt
new file mode 100644
index 0000000..5071182
--- /dev/null
+++ b/t/tests/menus-doc-base-sections/debian/doc1.txt
@@ -0,0 +1 @@
+Document 1
diff --git a/t/tests/menus-doc-base-sections/debian/doc2.txt b/t/tests/menus-doc-base-sections/debian/doc2.txt
new file mode 100644
index 0000000..b0374f0
--- /dev/null
+++ b/t/tests/menus-doc-base-sections/debian/doc2.txt
@@ -0,0 +1 @@
+Document 2
diff --git a/t/tests/menus-doc-base-sections/tags b/t/tests/menus-doc-base-sections/tags
new file mode 100644
index 0000000..45201b5
--- /dev/null
+++ b/t/tests/menus-doc-base-sections/tags
@@ -0,0 +1 @@
+W: menus-doc-base-sections: doc-base-uses-applications-section doc2:5 Apps/Programming

-- 
Debian package checker


Reply to: