From 608b022043d0449cf21f6bfb6b84fe9798dd664b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 9 May 2008 03:00:41 +0000 Subject: [PATCH] Use set.instersection() instead of a for loop. (trunk r10260) svn path=/main/branches/2.1.2/; revision=10261 --- bin/emerge | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/emerge b/bin/emerge index 009e1a95b..ef64ef1b3 100755 --- a/bin/emerge +++ b/bin/emerge @@ -5658,6 +5658,11 @@ class PackageCounters(object): class MergeTask(object): + _opts_ignore_blockers = \ + frozenset(["--buildpkgonly", + "--fetchonly", "--fetch-all-uri", + "--nodeps", "--pretend"]) + def __init__(self, settings, trees, myopts): self.settings = settings self.target_root = settings["ROOT"] @@ -5678,10 +5683,8 @@ class MergeTask(object): self._spawned_pids = [] def _find_blockers(self, new_pkg): - for opt in ("--buildpkgonly", "--nodeps", - "--fetchonly", "--fetch-all-uri", "--pretend"): - if opt in self.myopts: - return None + if self._opts_ignore_blockers.intersection(self.myopts): + return None blocker_dblinks = [] for blocking_pkg in self._blocker_db[ -- 2.26.2