From: Zac Medico Date: Mon, 11 Feb 2013 23:43:39 +0000 (-0800) Subject: _slot_operator_update_probe: detect insignificant X-Git-Tag: v2.2.0_alpha162~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0240b8b754ab5f642c50c863d4bec1dc3636ba29;p=portage.git _slot_operator_update_probe: detect insignificant This avoids rebuilding of two packages due to a sub-slot change in the child package without revision bump. The sub-slot change is considered insignificant until one of its parent packages needs to be rebuilt. --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 7423ae0be..085ac9bb6 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1176,6 +1176,7 @@ class depgraph(object): return None debug = "--debug" in self._frozen_config.myopts + selective = "selective" in self._dynamic_config.myparams want_downgrade = None for replacement_parent in self._iter_similar_available(dep.parent, @@ -1225,6 +1226,18 @@ class depgraph(object): if not want_downgrade: continue + insignificant = False + if selective and \ + dep.parent.installed and \ + dep.child.installed and \ + dep.parent.cpv == replacement_parent.cpv and \ + dep.child.cpv == pkg.cpv: + # Then can happen if the child's sub-slot changed + # without a revision bump. The sub-slot change is + # considered insignificant until one of its parent + # packages needs to be rebuilt. + insignificant = True + if debug: msg = [] msg.append("") @@ -1234,10 +1247,15 @@ class depgraph(object): msg.append(" existing parent package: %s" % dep.parent) msg.append(" new child package: %s" % pkg) msg.append(" new parent package: %s" % replacement_parent) + if insignificant: + msg.append("insignificant changes detected") msg.append("") writemsg_level("\n".join(msg), noiselevel=-1, level=logging.DEBUG) + if insignificant: + return None + return pkg if debug: