From: David James Date: Tue, 10 May 2011 20:41:06 +0000 (-0700) Subject: Strip build-time dependencies when they're ignored and we're not in --rebuild mode. X-Git-Tag: v2.2.0_alpha33~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=44675153854fe54fbd3c148fab2661df80fbf7ab;p=portage.git Strip build-time dependencies when they're ignored and we're not in --rebuild mode. This should improve depgraph calculation performance. TEST=Ran test suite. BUG=chromium-os:15144 Change-Id: I9e06817201d7a17ae9b44b424d01c1a2bd89210a --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 22a603e81..f7ea6863d 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1342,6 +1342,11 @@ class depgraph(object): elif root_deps == "rdeps": ignore_build_time_deps = True + # If rebuild mode is not enabled, it's safe to discard ignored + # build-time dependencies. + if ignore_build_time_deps and not self._rebuild.rebuild: + edepend["DEPEND"] = "" + deps = ( (depend_root, edepend["DEPEND"], self._priority(buildtime=True,