Adding side stream changes to Maemian. Working to integrate full upstream libraries...
[maemian] / nokia-lintian / reporting / templates / maintainer.tmpl
diff --git a/nokia-lintian/reporting/templates/maintainer.tmpl b/nokia-lintian/reporting/templates/maintainer.tmpl
new file mode 100644 (file)
index 0000000..18ec72a
--- /dev/null
@@ -0,0 +1,104 @@
+{ head("Lintian Report for $name", 1) }
+  <h1>{$name}</h1>
+
+  <p>
+    At the time of the last Lintian run, the following possible problems
+    were found in packages maintained by {$maintainer}, listed by source
+    package.
+{
+    if ($errors) {
+        qq(    See also the <a href="../full/$id">full report</a>, including)
+           . " info, experimental and overridden tags.";
+    } else {
+        qq(    See also the <a href="../maintainer/$id">report showing)
+           . " only errors and warnings</a>.";
+    }
+}
+    Also see their
+    <a href="http://qa.debian.org/developer.php?login={$email}">QA
+    overview</a>.
+  </p>
+
+{
+    # Show the summary only if the number of packages is within a certain
+    # range.
+    my $num_packages = keys(%packages) + keys(%uploads);
+    if ($num_packages > 1 and $num_packages < 20) {
+        $OUT .= qq(  <div id="summary">\n    <ul>\n);
+        foreach $source (sort(keys(%packages), keys(%uploads))) {
+            $OUT .= qq(      <li><a href="#$source">$source</a></li>\n);
+        }
+        $OUT .= "    </ul>\n  </div>\n";
+    }
+}
+  <div class="clear"></div>
+
+{
+    # We get a hash of package names to a hash of versions to a list of tags.
+    # Create a list with the package information as the title and the tags as
+    # the value.
+    for my $source (sort (keys (%packages), keys (%uploads))) {
+        my ($data, $upload);
+        if ($packages{$source}) {
+            $data = $packages{$source};
+        } else {
+            $data = $uploads{$source};
+            $upload = 1;
+        }
+        for my $version (sort keys %$data) {
+            my $tags = $data->{$version};
+            my $first = 1;
+            my $binary = '';
+            my $tag = '';
+            for my $info (@$tags) {
+                if ($errors) {
+                    next unless $info->{code} eq 'E' or $info->{code} eq 'W';
+                }
+
+                my $is_binary = $info->{type} eq "binary";
+                my $new_binary = $info->{package} ne $binary if $is_binary;
+
+                if ($first) {
+                    $OUT .= qq(  <div class="source-header">\n);
+                    $OUT .= qq(   <h2 id="$source">);
+                    $OUT .= "$source ($version)";
+                    $OUT .= " [Uploader]" if $upload;
+                    $OUT .= "</h2>\n";
+                    $OUT .= qq(   <p class="info-links">\n);
+                    $OUT .= qq(    <a href="http://packages.debian.org/src:$source">Info</a>\n);
+                    $OUT .= qq(    <a href="http://packages.qa.debian.org/$source">PTS</a>\n);
+                    $OUT .= qq(    <a href="http://bugs.debian.org/src:$source">Bugs</a>\n);
+                    $OUT .= qq(   </p>\n  </div>\n);
+                    $OUT .= qq(  <ul class="report">\n) unless $is_binary;
+                }
+
+                if ($new_binary) {
+                    $OUT .= "</ul>\n    </li>\n  </ul>\n" unless $first;
+                    $OUT .= qq(  <h3>$info->{package}</h3>\n);
+                    $OUT .= qq(  <ul class="report">\n);
+                }
+
+                # Display tag name only once.
+                if ($tag ne $info->{tag} or $new_binary) {
+                    $OUT .= "</ul>\n    </li>\n" unless $first or $new_binary;
+                    $OUT .= "    <li>\n";
+                    $OUT .= qq(      <span class="type-$info->{code}">);
+                    $OUT .= "$info->{code}</span> ";
+                    $OUT .= qq(<a href="../tags/$info->{tag}.html">);
+                    $OUT .= "$info->{tag}</a>\n";
+                    $OUT .= qq(      <ul class="extra">);
+                }
+
+                if ($info->{extra}) {
+                    $OUT .= "<li>$info->{extra}</li>";
+                }
+
+                $first = 0;
+                $binary = $info->{package};
+                $tag = $info->{tag};
+            }
+            $OUT .= "</ul>\n    </li>\n  </ul>\n";
+        }
+    }
+}
+{ foot() }