[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Debian: rework META_PKGSET; no functional change.
Holger Levsen
holger at layer-acht.org
Thu Nov 10 16:15:08 UTC 2016
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 7b17b69d8d525fd9da047e82a4dab57a6eef138a
Author: Daniel Shahaf <danielsh at apache.org>
Date: Thu Nov 10 15:58:14 2016 +0000
reproducible Debian: rework META_PKGSET; no functional change.
Signed-off-by: Holger Levsen <holger at layer-acht.org>
(+adopted to use _ as dummy varible…)
---
bin/reproducible_common.py | 6 ++----
bin/reproducible_html_pkg_sets.py | 7 ++-----
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index b23cb0e..eefef43 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -89,12 +89,10 @@ JENKINS_URL = 'https://jenkins.debian.net'
# global package set definitions
# META_PKGSET[pkgset_id] = (pkgset_name, pkgset_group)
# csv file columns: (pkgset_group, pkgset_name)
-META_PKGSET = {}
-pkgset_id = 0
+META_PKGSET = []
with open(os.path.join(BIN_PATH, './reproducible_pkgsets.csv'), newline='') as f:
for line in csv.reader(f):
- pkgset_id += 1
- META_PKGSET[pkgset_id] = (line[1], line[0])
+ META_PKGSET.append((line[1], line[0]))
# init the database data and connection
DB_ENGINE = create_engine("sqlite:///" + REPRODUCIBLE_DB, connect_args={'timeout': 60})
diff --git a/bin/reproducible_html_pkg_sets.py b/bin/reproducible_html_pkg_sets.py
index 0cf155c..0f4dc94 100755
--- a/bin/reproducible_html_pkg_sets.py
+++ b/bin/reproducible_html_pkg_sets.py
@@ -117,9 +117,7 @@ def update_stats(suite, arch, stats, pkgset_name):
def create_pkgset_navigation(suite, arch, view=None):
# Group the package sets by section
sections = OrderedDict()
- for index in range(1, len(META_PKGSET)+1):
- pkgset_name = META_PKGSET[index][0]
- pkgset_section = META_PKGSET[index][1]
+ for pkgset_name, pkgset_section in META_PKGSET:
pkgset = {
'class': "active" if pkgset_name == view else "",
'pkgset_name': pkgset_name,
@@ -302,8 +300,7 @@ for arch in ARCHS:
if suite == 'experimental':
continue
create_index_page(suite, arch)
- for index in META_PKGSET:
- pkgset_name = META_PKGSET[index][0]
+ for pkgset_name, _ in META_PKGSET:
stats = gather_meta_stats(suite, arch, pkgset_name)
if (stats):
update_stats(suite, arch, stats, pkgset_name)
--
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