From 0b5cd0a728b792dba92aa663d4d5f03c841391a3 Mon Sep 17 00:00:00 2001
From: Rosen Matev <rosen.matev@cern.ch>
Date: Thu, 8 Oct 2020 13:04:56 +0200
Subject: [PATCH] Fix disabling of projects with ci-test

Data packages need to be ignored when determining the subset of projects
to build in a ci-test slot.

Fixes #59
---
 python/LbNightlyTools/Scripts/Checkout.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/python/LbNightlyTools/Scripts/Checkout.py b/python/LbNightlyTools/Scripts/Checkout.py
index 1b5fc804..c6ba1a4f 100644
--- a/python/LbNightlyTools/Scripts/Checkout.py
+++ b/python/LbNightlyTools/Scripts/Checkout.py
@@ -233,7 +233,9 @@ class Script(BaseScript):
                 from networkx.algorithms.dag import ancestors, descendants
                 deps = slot.dependencyGraph()
                 # - we have to build the projects explicitly listed
-                needed = set(slot.metadata['ci_test']['requested_projects'])
+                #   (excluding data packages)
+                needed = (set(slot.metadata['ci_test']['requested_projects']) &
+                          set(deps))
                 # - plus all projects that use the listed ones
                 needed.update(
                     list(
-- 
GitLab