public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/_emerge/
Date: Thu, 26 May 2011 06:18:38 +0000 (UTC)	[thread overview]
Message-ID: <0a7d76f7ea98aaa041a314f607e46cc7f81ce588.zmedico@gentoo> (raw)

commit:     0a7d76f7ea98aaa041a314f607e46cc7f81ce588
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 00:46:11 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:51:11 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0a7d76f7

DepPriority: remove "rebuild" attribute

Since the addition of DepPriorityNormalRange and
DepPrioritySatisfiedRange in commit
bd369956b2a2fbc019a655a372628998499156c0, which solves most cases of
bug 199856, the Depriority.rebuild attribute doesn't appear to make any
difference. The edges that this attribute differentiates are already
naturally differentiated by the fact that the child node of a satisfied
buildtime dependency that's not being rebuilt will naturally be
identified as a leaf node earlier and removed from the graph, thereby
eliminating the edge before there's an opportunity to compare it with
a higher priority rebuild edge. The addition of the "optional"
attribute (in commit 15476805a156acd11fdaaa19212691e8ee09b309) also
plays a role here, since it converts some satisfied buildtime edges to
optional edges, thereby reducing their priority.

---
 pym/_emerge/DepPriority.py               |    2 +-
 pym/_emerge/DepPrioritySatisfiedRange.py |   31 +++++++----------------------
 pym/_emerge/depgraph.py                  |   12 -----------
 3 files changed, 9 insertions(+), 36 deletions(-)

diff --git a/pym/_emerge/DepPriority.py b/pym/_emerge/DepPriority.py
index f99b726..91afc05 100644
--- a/pym/_emerge/DepPriority.py
+++ b/pym/_emerge/DepPriority.py
@@ -4,7 +4,7 @@
 from _emerge.AbstractDepPriority import AbstractDepPriority
 class DepPriority(AbstractDepPriority):
 
-	__slots__ = ("satisfied", "optional", "rebuild")
+	__slots__ = ("satisfied", "optional")
 
 	def __int__(self):
 		"""

diff --git a/pym/_emerge/DepPrioritySatisfiedRange.py b/pym/_emerge/DepPrioritySatisfiedRange.py
index aa32d8f..7c2ea81 100644
--- a/pym/_emerge/DepPrioritySatisfiedRange.py
+++ b/pym/_emerge/DepPrioritySatisfiedRange.py
@@ -7,18 +7,17 @@ class DepPrioritySatisfiedRange(object):
 	DepPriority                         Index      Category
 
 	not satisfied and buildtime                    HARD
-	not satisfied and runtime              7       MEDIUM
-	not satisfied and runtime_post         6       MEDIUM_SOFT
-	satisfied and buildtime and rebuild    5       SOFT
+	not satisfied and runtime              6       MEDIUM
+	not satisfied and runtime_post         5       MEDIUM_SOFT
 	satisfied and buildtime                4       SOFT
 	satisfied and runtime                  3       SOFT
 	satisfied and runtime_post             2       SOFT
 	optional                               1       SOFT
 	(none of the above)                    0       NONE
 	"""
-	MEDIUM      = 7
-	MEDIUM_SOFT = 6
-	SOFT        = 5
+	MEDIUM      = 6
+	MEDIUM_SOFT = 5
+	SOFT        = 4
 	NONE        = 0
 
 	@classmethod
@@ -51,21 +50,8 @@ class DepPrioritySatisfiedRange(object):
 	def _ignore_satisfied_buildtime(cls, priority):
 		if priority.__class__ is not DepPriority:
 			return False
-		if priority.optional:
-			return True
-		if not priority.satisfied:
-			return False
-		if priority.buildtime:
-			return not priority.rebuild
-		return True
-
-	@classmethod
-	def _ignore_satisfied_buildtime_rebuild(cls, priority):
-		if priority.__class__ is not DepPriority:
-			return False
-		if priority.optional:
-			return True
-		return bool(priority.satisfied)
+		return bool(priority.optional or \
+			priority.satisfied)
 
 	@classmethod
 	def _ignore_runtime_post(cls, priority):
@@ -84,7 +70,7 @@ class DepPrioritySatisfiedRange(object):
 
 	ignore_medium      = _ignore_runtime
 	ignore_medium_soft = _ignore_runtime_post
-	ignore_soft        = _ignore_satisfied_buildtime_rebuild
+	ignore_soft        = _ignore_satisfied_buildtime
 
 
 DepPrioritySatisfiedRange.ignore_priority = (
@@ -93,7 +79,6 @@ DepPrioritySatisfiedRange.ignore_priority = (
 	DepPrioritySatisfiedRange._ignore_satisfied_runtime_post,
 	DepPrioritySatisfiedRange._ignore_satisfied_runtime,
 	DepPrioritySatisfiedRange._ignore_satisfied_buildtime,
-	DepPrioritySatisfiedRange._ignore_satisfied_buildtime_rebuild,
 	DepPrioritySatisfiedRange._ignore_runtime_post,
 	DepPrioritySatisfiedRange._ignore_runtime
 )

diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 808103c..d0409a4 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -831,18 +831,6 @@ class depgraph(object):
 				return 0
 
 		if not pkg.onlydeps:
-			if not pkg.installed and \
-				"empty" not in self._dynamic_config.myparams and \
-				vardbapi.match(pkg.slot_atom):
-				# Increase the priority of dependencies on packages that
-				# are being rebuilt. This optimizes merge order so that
-				# dependencies are rebuilt/updated as soon as possible,
-				# which is needed especially when emerge is called by
-				# revdep-rebuild since dependencies may be affected by ABI
-				# breakage that has rendered them useless. Don't adjust
-				# priority here when in "empty" mode since all packages
-				# are being merged in that case.
-				priority.rebuild = True
 
 			existing_node, existing_node_matches = \
 				self._check_slot_conflict(pkg, dep.atom)



             reply	other threads:[~2011-05-26  6:23 UTC|newest]

Thread overview: 136+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26  6:18 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-05-27  3:36 [gentoo-commits] proj/portage:2.1.9 commit in: pym/_emerge/ Zac Medico
2011-05-27  1:26 Zac Medico
2011-05-27  0:40 Zac Medico
2011-05-26 22:34 Zac Medico
2011-05-26 21:37 Zac Medico
2011-05-26 13:04 Zac Medico
2011-05-26 12:52 Zac Medico
2011-05-26 12:26 Zac Medico
2011-05-26 12:05 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-12  5:24 Zac Medico
2011-05-12  5:24 Zac Medico
2011-05-12  5:24 Zac Medico
2011-05-12  5:24 Zac Medico
2011-05-12  5:24 Zac Medico
2011-05-12  5:24 Zac Medico
2011-05-12  5:24 Zac Medico
2011-05-12  5:24 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-05 18:12 Zac Medico
2011-05-05 16:01 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-04-13  7:52 Zac Medico
2011-04-13  7:52 Zac Medico
2011-04-13  7:52 Zac Medico
2011-04-13  7:52 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-01 21:54 Zac Medico
2011-03-01 20:55 Zac Medico
2011-03-01 20:55 Zac Medico
2011-03-01 20:55 Zac Medico
2011-02-22 17:41 Zac Medico
2011-02-22  3:16 Zac Medico
2011-02-22  3:14 Zac Medico
2011-02-22  3:14 Zac Medico
2011-02-22  3:14 Zac Medico
2011-02-22  3:14 Zac Medico
2011-02-22  3:14 Zac Medico
2011-02-22  3:14 Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-14 17:02 Zac Medico
2011-02-14 16:45 Zac Medico
2011-02-14 16:35 Zac Medico
2011-02-14 16:04 Zac Medico
2011-02-14  7:49 Zac Medico
2011-02-14  7:49 Zac Medico
2011-02-14  7:49 Zac Medico
2011-02-14  7:49 Zac Medico
2011-02-14  7:49 Zac Medico
2011-02-14  5:04 Zac Medico
2011-02-14  4:31 Zac Medico
2011-02-14  4:31 Zac Medico
2011-02-14  4:31 Zac Medico
2011-02-14  4:31 Zac Medico
2011-02-14  4:31 Zac Medico
2011-02-08 20:48 Zac Medico
2011-02-05  3:37 Zac Medico
2011-02-04 17:47 zmedico
2011-02-04 15:57 zmedico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a7d76f7ea98aaa041a314f607e46cc7f81ce588.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox