From a107f5bad841e5fad65298881e5a1feb9ffdbed1 Mon Sep 17 00:00:00 2001
From: Zac Medico <zmedico@gentoo.org>
Date: Wed, 27 Nov 2019 17:40:50 -0800
Subject: [PATCH] depgraph: fix buildtime_blockers logic

Fixes: 1b3131db0e22 ("emerge --buildpkgonly: respect buildtime hard blockers")
Bug: https://bugs.gentoo.org/689226
Signed-off-by: Zac Medico <zmedico@gentoo.org>
---
 lib/_emerge/depgraph.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 6d8e731724..f80b077bc6 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -8309,9 +8309,7 @@ def ignore_uninst_or_med_soft(priority):
 				if blocker.priority.buildtime and blocker.atom.blocker.overlap.forbid:
 					buildtime_blockers.append(blocker)
 
-		if unsolvable_blockers and \
-			not buildtime_blockers and \
-			not self._accept_blocker_conflicts():
+		if unsolvable_blockers and (buildtime_blockers or not self._accept_blocker_conflicts()):
 			self._dynamic_config._unsatisfied_blockers_for_display = (tuple(buildtime_blockers)
 				if buildtime_blockers else unsolvable_blockers)
 			self._dynamic_config._serialized_tasks_cache = retlist
