[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: rblib.models: aid debug by defining a Package.__str__()

Mattia Rizzolo gitlab at salsa.debian.org
Wed Sep 26 16:03:50 BST 2018


Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
4d9ea9e5 by Mattia Rizzolo at 2018-09-26T15:00:08Z
rblib.models: aid debug by defining a Package.__str__()

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
eb1d60f0 by Mattia Rizzolo at 2018-09-26T15:00:52Z
reproducible debian: don't consider unknown suites while building the history page

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


2 changed files:

- bin/rblib/models.py
- bin/reproducible_html_packages.py


Changes:

=====================================
bin/rblib/models.py
=====================================
@@ -230,6 +230,9 @@ class Package:
         self.__dict__ = _Package_cache().get(name)
         self.name = name
 
+    def __str__(self):
+        return "<Package: {}>".format(self.name)
+
     @lazyproperty
     def builds(self):
         self._l_builds = {}


=====================================
bin/reproducible_html_packages.py
=====================================
@@ -19,7 +19,7 @@ import sqlalchemy
 apt_pkg.init_system()
 
 from rblib import query_db
-from rblib.confparse import log, args, conf_distro
+from rblib.confparse import log, args
 from rblib.models import Package, Status
 from rblib.utils import strip_epoch, convert_into_hms_string
 from rblib.html import gen_status_link_icon, write_html_page
@@ -304,6 +304,10 @@ def gen_history_page(package, arch=None):
         for r in package.history:
             # make a copy, since we modify in place
             record = dict(r)
+            # XXX - hacky, should be rethought one day
+            # skip records for suites that are unknown to us (i.e. other distro)
+            if record['suite'] not in SUITES:
+                continue
             # skip records for other archs if we care about arch
             if arch and record['architecture'] != arch:
                 continue
@@ -436,7 +440,7 @@ def gen_packages_html(packages, no_clean=False):
 
 def gen_all_rb_pkg_pages(no_clean=False):
     query = 'SELECT DISTINCT name FROM sources WHERE suite = ANY(:s)'
-    rows = query_db(sqlalchemy.text(query), s=conf_distro['suites'].split())
+    rows = query_db(sqlalchemy.text(query), s=SUITES)
     pkgs = [Package(str(i[0]), no_notes=True) for i in rows]
     log.info('Processing all %s package from all suites/architectures',
              len(pkgs))



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/a4d4dcc95a06c7f76096d4b014841d13504e8e42...eb1d60f062125b810aa2783e8bf95e1f623aa381

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/a4d4dcc95a06c7f76096d4b014841d13504e8e42...eb1d60f062125b810aa2783e8bf95e1f623aa381
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/qa-jenkins-scm/attachments/20180926/888ef71c/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list