[Piuparts-commits] [piuparts] 05/10: p-r: mark arch:all packages with an ":all" suffix in lists

Holger Levsen holger at layer-acht.org
Mon Dec 19 13:04:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 9f8fb614d5aa15648b2ee2c361fb2c928cc366b6
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon Dec 19 10:15:09 2016 +0100

    p-r: mark arch:all packages with an ":all" suffix in lists
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 debian/changelog   |  2 ++
 piuparts-report.py | 15 +++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 81caf83..1fefb6a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
 piuparts (0.74) UNRELEASED; urgency=medium
 
+  * piuparts-reports.py:
+    - Mark arch:all packages with an :all suffix in package lists.
   * pre_install_database-server: Use default-mysql-* from stretch onwards.
 
  -- Andreas Beckmann <anbe at debian.org>  Mon, 19 Dec 2016 03:10:28 +0100
diff --git a/piuparts-report.py b/piuparts-report.py
index ca7e6dd..8651512 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -369,6 +369,7 @@ $PACKAGE_LIST</ul>
 
 PKG_ERROR_TPL = \
     """<li>$RDEPS - <a href=\"$LOG\">$LOG</a>
+    """<li>$RDEPS - <a href=\"$LOG\">$LOG</a>$ARCH
     (<a href=\"https://tracker.debian.org/pkg/$SPKG\" target=\"_blank\">PTS</a>)
     (<a href=\"https://bugs.debian.org/$PACKAGE?dist=unstable\" target=\"_blank\">BTS</a>)
 $BUG</li>
@@ -1098,10 +1099,14 @@ class Section:
                 state_style = "labelcell"
 
             binary_version = self._binary_db.get_control_header(binary, "Version")
+            binary_arch = self._binary_db.get_control_header(binary, "Architecture")
+            archsuffix = ""
+            if binary_arch == "all":
+                archsuffix = ":all"
             binaryrows +=   "<tr class=\"normalrow\">" \
                           + "<td class=\"labelcell\">Binary:</td>" \
-                          + "<td class=\"contentcell2\">%s</td>" \
-                            % binary\
+                          + "<td class=\"contentcell2\">%s%s</td>" \
+                            % (binary, archsuffix) \
                           + "<td class=\"%s\">piuparts-result:</td>" \
                             % state_style \
                           + "<td class=\"contentcell2\">%s %s</td>" \
@@ -1389,6 +1394,8 @@ class Section:
                 vlist += "<li id=\"%s\">%s" % (
                                          package2id(package["Package"]),
                                          self.link_to_source_summary(package["Package"]))
+                if package["Architecture"] == "all":
+                    vlist += ":all"
                 if with_counts:
                     vlist += " (%d, %d)" % (self._binary_db.rrdep_count(package["Package"]),
                                             self._binary_db.block_count(package["Package"]))
@@ -1598,6 +1605,9 @@ def update_tpl(basedir, section, problem, failures, logdict, ftpl, ptpl, pkgsdb)
         bin_pkg = get_pkg(failure.pkgspec)
         src_pkg = pkgsdb.get_source(bin_pkg)
         rdep_cnt = pkgsdb.rrdep_count(bin_pkg)
+        bin_arch = ""
+        if pkgsdb.get_control_header(bin_pkg, "Architecture") == "all":
+            bin_arch = " [all]"
 
         if bugged_section is False and failure.where != 'fail':
             bugged_section = True
@@ -1608,6 +1618,7 @@ def update_tpl(basedir, section, problem, failures, logdict, ftpl, ptpl, pkgsdb)
         pkg_text += populate_tpl(ftpl, {
                                 'LOG': log,
                                 'PACKAGE': bin_pkg,
+                                'ARCH': bin_arch,
                                 'BUG': get_bug_text(log),
                                 'RDEPS': rdep_cnt,
                                 'SPKG': src_pkg,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list