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
# 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:
# 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
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:
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
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
"""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__ = (
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: