public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/
Date: Wed, 23 Feb 2011 09:10:25 +0000 (UTC)	[thread overview]
Message-ID: <768096f120ac1aec161416e284eeec97ef376b3d.dol-sen@gentoo> (raw)

commit:     768096f120ac1aec161416e284eeec97ef376b3d
Author:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Fri Feb 11 05:49:11 2011 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Feb 11 05:50:59 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=768096f1

apply djanderson's idea for a simpler/better fix to bug 353430 and commit 000ce49860b253ad6c917c5a58bc0ff31225134a for
use conditionals causing errors in equery results.

---
 pym/gentoolkit/atom.py         |   17 ++++++++++-------
 pym/gentoolkit/dependencies.py |    4 ++--
 pym/gentoolkit/helpers.py      |   14 +-------------
 3 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/pym/gentoolkit/atom.py b/pym/gentoolkit/atom.py
index fe9adaa..7282fac 100644
--- a/pym/gentoolkit/atom.py
+++ b/pym/gentoolkit/atom.py
@@ -81,10 +81,13 @@ class Atom(portage.dep.Atom, CPV):
 			if self.blocker.overlap.forbid != other.blocker.overlap.forbid:
 				return False
 
+		if self.use_conditional != other.use_conditional:
+			return False
+
 		# Don't believe Portage has something like this
 		#c = cmp(self.negate_vers, other.negate_vers)
 		#if c:
-		#	return c
+		#   return c
 
 		if self.slot != other.slot:
 			return False
@@ -133,7 +136,7 @@ class Atom(portage.dep.Atom, CPV):
 		# Don't believe Portage has something like this
 		#c = cmp(self.negate_vers, other.negate_vers)
 		#if c:
-		#	return c
+		#   return c
 
 		if self.slot != other.slot:
 			if self.slot is None:
@@ -229,8 +232,8 @@ class Atom(portage.dep.Atom, CPV):
 
 		# TODO: Uncomment when Portage's Atom supports repo
 		#if (self.repo_name is not None and other.repo_name is not None and
-		#	self.repo_name != other.repo_name):
-		#	return False
+		#   self.repo_name != other.repo_name):
+		#   return False
 
 		# Use deps are similar: if one of us forces a flag on and the
 		# other forces it off we do not intersect. If only one of us
@@ -247,9 +250,9 @@ class Atom(portage.dep.Atom, CPV):
 				if flag[0] == '-' and flag[1:] in flags:
 					return False
 
-        # Remaining thing to check is version restrictions. Get the
-        # ones we can check without actual version comparisons out of
-        # the way first.
+		# Remaining thing to check is version restrictions. Get the
+		# ones we can check without actual version comparisons out of
+		# the way first.
 
 		# If one of us is unversioned we intersect:
 		if not self.operator or not other.operator:

diff --git a/pym/gentoolkit/dependencies.py b/pym/gentoolkit/dependencies.py
index 6aadc35..feced63 100644
--- a/pym/gentoolkit/dependencies.py
+++ b/pym/gentoolkit/dependencies.py
@@ -19,7 +19,7 @@ from portage.dep import paren_reduce
 from gentoolkit import errors
 from gentoolkit.atom import Atom
 from gentoolkit.cpv import CPV
-from gentoolkit.helpers import uniqify_atoms
+from gentoolkit.helpers import uniqify
 from gentoolkit.dbapi import PORTDB, VARDB
 from gentoolkit.query import Query
 
@@ -243,7 +243,7 @@ class Dependencies(Query):
 			try:
 				all_depends = depcache[pkgdep]
 			except KeyError:
-				all_depends = uniqify_atoms(pkgdep.get_all_depends())
+				all_depends = uniqify(pkgdep.get_all_depends())
 				depcache[pkgdep] = all_depends
 
 			dep_is_displayed = False

diff --git a/pym/gentoolkit/helpers.py b/pym/gentoolkit/helpers.py
index cf1b138..cd8b763 100644
--- a/pym/gentoolkit/helpers.py
+++ b/pym/gentoolkit/helpers.py
@@ -7,7 +7,7 @@
 """Miscellaneous helper functions and classes.
 
 @note: find_* functions that previously lived here have moved to
-       the query module, where they are called as: Query('portage').find_*().
+	   the query module, where they are called as: Query('portage').find_*().
 """
 
 __all__ = (
@@ -476,16 +476,4 @@ def uniqify(seq, preserve_order=True):
 
 	return result
 
-def uniqify_atoms(seq):
-	"""Return a uniqified list."""
-	seen = set()
-	result = []
-	for x in seq:
-		dep = x.get_depstr()
-		if dep not in seen:
-			result.append(x)
-			seen.add(dep)
-
-	return result
-
 # vim: set ts=4 sw=4 tw=79:



             reply	other threads:[~2011-02-23  9:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23  9:10 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-31 21:53 [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/ Paul Varner
2011-04-18 18:28 Paul Varner
2011-05-18 21:18 Brian Dolbec
2011-05-20  5:54 Brian Dolbec
2011-05-23  3:45 Brian Dolbec
2011-07-15 20:02 Paul Varner
2011-07-16  3:21 Paul Varner
2011-07-16  4:04 Paul Varner
2011-12-23  6:05 Brian Dolbec
2012-03-02  0:01 Brian Dolbec
2012-05-16 21:18 Paul Varner
2012-07-24 17:18 Paul Varner
2012-08-01  3:34 Brian Dolbec
2012-10-09 21:35 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-11-13 20:40 Paul Varner
2012-12-30 20:25 Brian Dolbec
2013-01-04 22:23 Paul Varner
2013-03-12 16:06 Mike Frysinger
2014-02-22 19:28 Brian Dolbec
2015-06-02 22:10 Paul Varner

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=768096f120ac1aec161416e284eeec97ef376b3d.dol-sen@gentoo \
    --to=brian.dolbec@gmail.com \
    --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