From 978de21bab2729d31a98a8806841973663ebd37f Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 7 Apr 2016 20:00:05 +0000 Subject: [PATCH] Create an artificial rpms-checks/ dist-git namespace (in staging). --- roles/distgit/templates/genacls.pkgdb | 9 +++++++++ roles/distgit/templates/pkgdb_sync_git_branches.py | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/roles/distgit/templates/genacls.pkgdb b/roles/distgit/templates/genacls.pkgdb index a90c4a3e40..81b65be678 100644 --- a/roles/distgit/templates/genacls.pkgdb +++ b/roles/distgit/templates/genacls.pkgdb @@ -5,6 +5,7 @@ # Takes no arguments! # +import copy import grp import sys @@ -69,6 +70,14 @@ if __name__ == '__main__': #print ' RW private- = @all' # dont' enable the above until we prevent building for real from private- +{% if env == 'staging' %} + # XXX - Insert an artificial namespace into the set of namespaces returned + # by pkgdb. We want to create a mirror of rpms/PKG in rpms-checks/PKG + # This hack occurs in two places. Here, and in the branch-creation script. + # https://github.com/fedora-infra/pkgdb2/issues/329#issuecomment-207050233 + data['rpms-checks'] = copy.copy(data['rpms']) +{% endif %} + # Get a list of all the packages for key in data: if key == 'title': diff --git a/roles/distgit/templates/pkgdb_sync_git_branches.py b/roles/distgit/templates/pkgdb_sync_git_branches.py index 1cbe94d3a5..0526744c29 100644 --- a/roles/distgit/templates/pkgdb_sync_git_branches.py +++ b/roles/distgit/templates/pkgdb_sync_git_branches.py @@ -38,6 +38,7 @@ Here are the different steps of this script: """ +import copy import itertools import multiprocessing.pool import os @@ -249,6 +250,14 @@ def main(): pkgdb_info = pkgdb_pkg_branch() +{% if env == 'staging' %} + # XXX - Insert an artificial namespace into the set of namespaces returned + # by pkgdb. We want to create a mirror of rpms/PKG in rpms-checks/PKG + # This hack occurs in two places. Here, and in genacls.pkgdb. + # https://github.com/fedora-infra/pkgdb2/issues/329#issuecomment-207050233 + pkgdb_info['rpms-checks'] = copy.copy(pkgdb_info['rpms']) +{% endif %} + for ns in pkgdb_info: namespace = ns if ns == 'packageAcls':