[Qa-jenkins-scm] [jenkins.debian.net] 02/04: reproducible: deal with removed packages gracefully

Holger Levsen holger at moszumanska.debian.org
Sun Mar 15 11:27:31 UTC 2015


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

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 243d7fdac173df2d4290f6540ce9f2df0bcb4afb
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Mar 15 11:53:47 2015 +0100

    reproducible: deal with removed packages gracefully
---
 bin/reproducible_html_notes.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py
index fc906b7..e1b9881 100755
--- a/bin/reproducible_html_notes.py
+++ b/bin/reproducible_html_notes.py
@@ -10,6 +10,7 @@
 #
 # Build html pages based on the content of the notes.git repository
 
+import copy
 import yaml
 from reproducible_common import *
 from reproducible_html_packages import gen_packages_html
@@ -152,11 +153,12 @@ def load_notes():
     { 'package_name': {'version': '0.0', 'comments'<etc>}, 'package_name':{} }
     """
     with open(NOTES) as fd:
-        notes = yaml.load(fd)
-    log.debug("notes loaded. There are " + str(len(notes)) +
+        possible_notes = yaml.load(fd)
+    log.debug("notes loaded. There are " + str(len(possible_notes)) +
                   " package listed")
-    for package in notes:   # check if every package listed on the notes
-        try:                # actually have been tested
+    notes = copy.copy(possible_notes)
+    for package in possible_notes:   # check if every package listed on the notes
+        try:                         # actually have been tested
             query = 'SELECT s.name ' + \
                     'FROM results AS r JOIN sources AS s ON r.package_id=s.id ' + \
                     'WHERE s.name="{pkg}" AND r.status != ""'
@@ -166,6 +168,8 @@ def load_notes():
             log.warning("This query produces no results: " + query)
             log.warning("This means there is no tested package with the name " + package + ".")
             del notes[package]
+    log.debug("notes checked. There are " + str(len(notes)) +
+                  " package listed")
     return notes
 
 

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



More information about the Qa-jenkins-scm mailing list