Adding side stream changes to Maemian. Working to integrate full upstream libraries...
[maemian] / nokia-lintian / debian / patches / 805-add-known-maemo-sections.dpatch
diff --git a/nokia-lintian/debian/patches/805-add-known-maemo-sections.dpatch b/nokia-lintian/debian/patches/805-add-known-maemo-sections.dpatch
new file mode 100755 (executable)
index 0000000..e69b092
--- /dev/null
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 805-add-known-maemo-sections.dpatch by  <rojkov@corin.research.nokia.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add additional sections to conform Maemo policy
+
+@DPATCH@
+
+diff -ru lintian-1.24.2.orig/checks/common_data.pm lintian-1.24.2/checks/common_data.pm
+--- lintian-1.24.2.orig/checks/common_data.pm  2008-07-14 03:31:09.000000000 +0300
++++ lintian-1.24.2/checks/common_data.pm       2008-07-31 19:47:00.000000000 +0300
+@@ -6,6 +6,7 @@
+ our @EXPORT = qw
+ (
+    %known_archs %known_sections %known_non_us_parts %known_archive_parts
++   %known_maemo_parts
+    %known_prios %known_source_fields %known_binary_fields %known_udeb_fields
+    %known_obsolete_fields %known_essential %known_build_essential
+    %known_obsolete_packages %known_obsolete_emacs %known_virtual_packages
+@@ -68,6 +69,11 @@
+ %known_non_us_parts = map { $_ => 1 } ('non-free', 'contrib', 'main' );
++%known_maemo_parts = map { $_ => 1 } 
++    ('accessories', 'communication', 'games', 'multimedia', 'office',
++     'other', 'programming', 'support', 'themes', 'tools'
++    );
++
+ %known_archive_parts = map { $_ => 1 }
+     ('non-free', 'contrib', 'non-US', 'non-us' );
+diff -ru lintian-1.24.2.orig/checks/fields lintian-1.24.2/checks/fields
+--- lintian-1.24.2.orig/checks/fields  2008-07-14 03:31:09.000000000 +0300
++++ lintian-1.24.2/checks/fields       2008-07-31 19:54:06.000000000 +0300
+@@ -321,6 +321,8 @@
+               if ($parts[1] and not $known_non_us_parts{$parts[1]}) {
+                   tag "unknown-section", "$section";
+               }
++          } elsif ($parts[0] =~ /user/ and $parts[1]) {
++              tag "unknown-section", "$section" unless $known_maemo_parts{$parts[1]};
+           } elsif (scalar @parts > 1) {
+               tag "unknown-section", "$section" unless $known_archive_parts{$parts[0]};
+               tag "unknown-section", "$section" unless $known_sections{$parts[1]};