[Piuparts-devel] [Git][debian/piuparts][develop] 2 commits: Don't add results from outdated binaries to summary.json

Holger Levsen gitlab at salsa.debian.org
Wed Oct 31 16:29:08 GMT 2018


Holger Levsen pushed to branch develop at Debian / piuparts


Commits:
62a6b3c4 by Ivo De Decker at 2018-10-31T16:27:48Z
Don't add results from outdated binaries to summary.json

Signed-off-by: Ivo De Decker <ivodd at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
ae52ab48 by Holger Levsen at 2018-10-31T16:28:50Z
add changelog entry for Ivo

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- debian/changelog
- piuparts-report.py


Changes:

=====================================
debian/changelog
=====================================
@@ -18,6 +18,10 @@ piuparts (0.94) UNRELEASED; urgency=medium
   * piuparts.py: Use mknod instead of touch to create missing /dev/ptmx
     mountpoint, working around findutils bug #912180 (Closes: #911334)
 
+  [ Ivo De Decker ]
+  * piuparts-reports.py: Don't add results from outdated binaries to
+    summary.json.
+
  -- Holger Levsen <holger at debian.org>  Sun, 21 Oct 2018 14:03:22 +0200
 
 piuparts (0.93) unstable; urgency=medium


=====================================
piuparts-report.py
=====================================
@@ -1611,6 +1611,8 @@ class Section:
             summary = pkgsummary.new_summary()
 
             for reporting_section in reporting_sections:
+                source_done = {}
+                source_todo = {}
                 for binpkg in self._binary_db.get_all_packages():
                     pkgname = binpkg["Package"]
                     state = self._binary_db.get_package_state(pkgname)
@@ -1619,13 +1621,30 @@ class Section:
                     if flag == 'F':
                         block_cnt = self._binary_db.block_count(pkgname)
                     srcpkg = self._binary_db.get_package(pkgname).source()
+                    srcver = self._binary_db.get_package(pkgname).source_version()
+                    latest_srcver = self._source_db.get_test_versions(srcpkg)
                     url = source_summary_url(
                               web_host, self._doc_root,
                               self._config.section, srcpkg)
 
-                    pkgsummary.add_summary(
-                                   summary, reporting_section, srcpkg,
-                                   flag, block_cnt, url)
+                    if (srcver != latest_srcver):
+                        # if the binary package is cruft, we don't add it to
+                        # the report, but we keep track to make sure the
+                        # source package is added
+                        source_todo[srcpkg] = url
+                    else:
+                        pkgsummary.add_summary(
+                                       summary, reporting_section, srcpkg,
+                                       flag, block_cnt, url)
+                        source_done[srcpkg] = 1
+                for srcpkg in source_todo:
+                    # source packages that only have outdated binaries are
+                    # waiting for the build, so we add them as 'W'
+                    # (waiting-to-be-tested)
+                    if srcpkg not in source_done:
+                        pkgsummary.add_summary(
+                                       summary, reporting_section, srcpkg,
+                                       'W', 0, source_todo[srcpkg])
 
             pkgsummary.write_summary(summary, summary_path)
 



View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/a99ecade05aeb855c5e17528403956300ee280c7...ae52ab4865ec9a0618fb406c7d225e1fccd6b5f3

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/a99ecade05aeb855c5e17528403956300ee280c7...ae52ab4865ec9a0618fb406c7d225e1fccd6b5f3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20181031/710380f8/attachment-0001.html>


More information about the Piuparts-devel mailing list