From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PsAjz-000549-Ih for garchives@archives.gentoo.org; Wed, 23 Feb 2011 09:10:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EE0331C00A; Wed, 23 Feb 2011 09:10:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A47FE1C00A for ; Wed, 23 Feb 2011 09:10:26 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DC6CE1B406D for ; Wed, 23 Feb 2011 09:10:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5270A8006A for ; Wed, 23 Feb 2011 09:10:25 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <768096f120ac1aec161416e284eeec97ef376b3d.dol-sen@gentoo> Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/atom.py pym/gentoolkit/dependencies.py pym/gentoolkit/helpers.py X-VCS-Directories: pym/gentoolkit/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 768096f120ac1aec161416e284eeec97ef376b3d Date: Wed, 23 Feb 2011 09:10:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 1838ee52b0227e4f72e1a45ce47d3a21 commit: 768096f120ac1aec161416e284eeec97ef376b3d Author: Brian Dolbec gmail com> AuthorDate: Fri Feb 11 05:49:11 2011 +0000 Commit: Brian Dolbec gmail com> CommitDate: Fri Feb 11 05:50:59 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoolkit.gi= t;a=3Dcommit;h=3D768096f1 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 !=3D other.blocker.overlap.forbid: return False =20 + if self.use_conditional !=3D other.use_conditional: + return False + # Don't believe Portage has something like this #c =3D cmp(self.negate_vers, other.negate_vers) #if c: - # return c + # return c =20 if self.slot !=3D other.slot: return False @@ -133,7 +136,7 @@ class Atom(portage.dep.Atom, CPV): # Don't believe Portage has something like this #c =3D cmp(self.negate_vers, other.negate_vers) #if c: - # return c + # return c =20 if self.slot !=3D other.slot: if self.slot is None: @@ -229,8 +232,8 @@ class Atom(portage.dep.Atom, CPV): =20 # 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 !=3D other.repo_name): - # return False + # self.repo_name !=3D other.repo_name): + # return False =20 # 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] =3D=3D '-' and flag[1:] in flags: return False =20 - # 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. =20 # 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 =20 @@ -243,7 +243,7 @@ class Dependencies(Query): try: all_depends =3D depcache[pkgdep] except KeyError: - all_depends =3D uniqify_atoms(pkgdep.get_all_depends()) + all_depends =3D uniqify(pkgdep.get_all_depends()) depcache[pkgdep] =3D all_depends =20 dep_is_displayed =3D 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. =20 @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_*(= ). """ =20 __all__ =3D ( @@ -476,16 +476,4 @@ def uniqify(seq, preserve_order=3DTrue): =20 return result =20 -def uniqify_atoms(seq): - """Return a uniqified list.""" - seen =3D set() - result =3D [] - for x in seq: - dep =3D x.get_depstr() - if dep not in seen: - result.append(x) - seen.add(dep) - - return result - # vim: set ts=3D4 sw=3D4 tw=3D79: