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

[SCM] Debian package checker branch, master, updated. 2.5.3-57-gccf3714



The following commit has been merged in the master branch:
commit ccf37141b9e50859e4d43d4e4a802266799b532d
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Oct 11 19:26:01 2011 +0200

    reporting:  Ensure source tags appear before binary tags
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index 26af8d9..0047106 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -113,6 +113,9 @@ lintian (2.5.4) UNRELEASED; urgency=low
     + [NT] Do not accept LINTIAN_UNPACK_LEVEL nor LINTIAN_SECTION
       anymore.  The lintian frontend lost support for these in
       2.5.0~rc3.
+  * reporting/html_reports:
+    + [NT] Ensure source tags appear before binary tags.
+      (Closes: #580945)
 
  -- Niels Thykier <niels@thykier.net>  Sat, 10 Sep 2011 13:44:01 +0200
 
diff --git a/reporting/html_reports b/reporting/html_reports
index 438d09a..9499466 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -665,7 +665,15 @@ sub output_template {
 
 # Sort function for sorting lists of tags.  Sort by package, version, area,
 # type, tag, and then any extra data.  This will produce the best HTML output.
+#
+# Note that source tags must come before all other tags, hench the "unfair"
+# priority for those.  This is because the first tags listed are assumed to
+# be source package tags.
 sub by_tag {
+    if ($a->{type} ne $b->{type}) {
+        return -1 if $a->{type} eq 'source';
+        return  1 if $b->{type} eq 'source';
+    }
     return $a->{package} cmp $b->{package}
         || $a->{version} cmp $b->{version}
         || $a->{area}    cmp $b->{area}
diff --git a/reporting/templates/maintainer.tmpl b/reporting/templates/maintainer.tmpl
index 0cf8e79..f45fa15 100644
--- a/reporting/templates/maintainer.tmpl
+++ b/reporting/templates/maintainer.tmpl
@@ -25,7 +25,7 @@
     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))) {
+        foreach my $source (sort(keys(%packages), keys(%uploads))) {
             # Only display a link for the package if either we're
             # displaying the full report, or the package has error
             # or warning tags

-- 
Debian package checker


Reply to: