From: Zac Medico Date: Fri, 9 May 2008 03:00:41 +0000 (-0000) Subject: Use set.instersection() instead of a for loop. (trunk r10260) X-Git-Tag: v2.1.5~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=608b022043d0449cf21f6bfb6b84fe9798dd664b;p=portage.git Use set.instersection() instead of a for loop. (trunk r10260) svn path=/main/branches/2.1.2/; revision=10261 --- 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[