Added some code to peer into a data structure in Maemian/Schedule.pm. Also added the
[maemian] / nokia-lintian / debian / patches / 805-add-known-maemo-sections.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 805-add-known-maemo-sections.dpatch by  <rojkov@corin.research.nokia.com>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Add additional sections to conform Maemo policy
6
7 @DPATCH@
8
9 diff -ru lintian-1.24.2.orig/checks/common_data.pm lintian-1.24.2/checks/common_data.pm
10 --- lintian-1.24.2.orig/checks/common_data.pm   2008-07-14 03:31:09.000000000 +0300
11 +++ lintian-1.24.2/checks/common_data.pm        2008-07-31 19:47:00.000000000 +0300
12 @@ -6,6 +6,7 @@
13  our @EXPORT = qw
14  (
15     %known_archs %known_sections %known_non_us_parts %known_archive_parts
16 +   %known_maemo_parts
17     %known_prios %known_source_fields %known_binary_fields %known_udeb_fields
18     %known_obsolete_fields %known_essential %known_build_essential
19     %known_obsolete_packages %known_obsolete_emacs %known_virtual_packages
20 @@ -68,6 +69,11 @@
21  
22  %known_non_us_parts = map { $_ => 1 } ('non-free', 'contrib', 'main' );
23  
24 +%known_maemo_parts = map { $_ => 1 } 
25 +    ('accessories', 'communication', 'games', 'multimedia', 'office',
26 +     'other', 'programming', 'support', 'themes', 'tools'
27 +    );
28 +
29  %known_archive_parts = map { $_ => 1 }
30      ('non-free', 'contrib', 'non-US', 'non-us' );
31  
32 diff -ru lintian-1.24.2.orig/checks/fields lintian-1.24.2/checks/fields
33 --- lintian-1.24.2.orig/checks/fields   2008-07-14 03:31:09.000000000 +0300
34 +++ lintian-1.24.2/checks/fields        2008-07-31 19:54:06.000000000 +0300
35 @@ -321,6 +321,8 @@
36                 if ($parts[1] and not $known_non_us_parts{$parts[1]}) {
37                     tag "unknown-section", "$section";
38                 }
39 +           } elsif ($parts[0] =~ /user/ and $parts[1]) {
40 +               tag "unknown-section", "$section" unless $known_maemo_parts{$parts[1]};
41             } elsif (scalar @parts > 1) {
42                 tag "unknown-section", "$section" unless $known_archive_parts{$parts[0]};
43                 tag "unknown-section", "$section" unless $known_sections{$parts[1]};