Commits

Michał Górny  committed 4c3fe4e

OneOf -> AnyOf, to match PMS naming.

  • Participants
  • Parent commits 3d286b6

Comments (0)

Files changed (4)

File gentoopm/basepm/depend.py

 				if d.enabled:
 					for d in self._iter_deps(d):
 						yield d
-			elif isinstance(d, PMOneOfDep):
-				yield PMUncondOneOfDep(d)
+			elif isinstance(d, PMAnyOfDep):
+				yield PMUncondAnyOfDep(d)
 			else:
 				yield d
 
 class PMUncondAllOfDep(PMAllOfDep, PMUncondBaseDep):
 	pass
 
-class PMOneOfDep(PMBaseDep):
+class PMAnyOfDep(PMBaseDep):
 	"""
 	A one-of dependency set (C{|| ( ... )}).
 	"""
 
 	@property
 	def without_conditionals(self):
-		return PMUncondOneOfDep(self)
+		return PMUncondAnyOfDep(self)
 
-class PMUncondOneOfDep(PMOneOfDep, PMUncondBaseDep):
+class PMUncondAnyOfDep(PMAnyOfDep, PMUncondBaseDep):
 	pass
 
 class PMPackageDepSet(PMAllOfDep):

File gentoopm/paludispm/depend.py

 import paludis
 
 from gentoopm.basepm.depend import PMPackageDepSet, PMConditionalDep, \
-	PMOneOfDep, PMAllOfDep, PMBaseDep
+	PMAnyOfDep, PMAllOfDep, PMBaseDep
 from gentoopm.paludispm.atom import PaludisAtom
 
 class PaludisBaseDep(PMBaseDep):
 			if isinstance(d, paludis.PackageDepSpec):
 				yield PaludisAtom(d, self._pkg._env)
 			elif isinstance(d, paludis.AnyDepSpec):
-				yield PaludisOneOfDep(d, self._pkg)
+				yield PaludisAnyOfDep(d, self._pkg)
 			elif isinstance(d, paludis.AllDepSpec):
 				yield PaludisAllOfDep(d, self._pkg)
 			elif isinstance(d, paludis.ConditionalDepSpec):
 			else:
 				raise NotImplementedError('Unable to parse %s' % repr(d))
 
-class PaludisOneOfDep(PMOneOfDep, PaludisBaseDep):
+class PaludisAnyOfDep(PMAnyOfDep, PaludisBaseDep):
 	pass
 
 class PaludisAllOfDep(PMAllOfDep, PaludisBaseDep):

File gentoopm/pkgcorepm/depend.py

 from pkgcore.restrictions.packages import Conditional
 
 from gentoopm.basepm.depend import PMPackageDepSet, PMConditionalDep, \
-	PMOneOfDep, PMAllOfDep, PMBaseDep
+	PMAnyOfDep, PMAllOfDep, PMBaseDep
 from gentoopm.pkgcorepm.atom import PkgCoreAtom
 
 class PkgCoreBaseDep(PMBaseDep):
 			if isinstance(d, atom):
 				yield PkgCoreAtom(d)
 			elif isinstance(d, OrRestriction):
-				yield PkgCoreOneOfDep(d, self._pkg)
+				yield PkgCoreAnyOfDep(d, self._pkg)
 			elif isinstance(d, AndRestriction):
 				yield PkgCoreAllOfDep(d, self._pkg)
 			elif isinstance(d, Conditional) and d.attr == 'use':
 				raise NotImplementedError('Parsing %s not implemented' \
 						% repr(d))
 
-class PkgCoreOneOfDep(PMOneOfDep, PkgCoreBaseDep):
+class PkgCoreAnyOfDep(PMAnyOfDep, PkgCoreBaseDep):
 	pass
 
 class PkgCoreAllOfDep(PMAllOfDep, PkgCoreBaseDep):
 			if isinstance(d, atom):
 				yield PkgCoreAtom(d)
 			elif isinstance(d, OrRestriction):
-				yield PkgCoreUncondOneOfDep(d)
+				yield PkgCoreUncondAnyOfDep(d)
 			elif isinstance(d, AndRestriction):
 				yield PkgCoreUncondAllOfDep(d, self._pkg)
 			else:
 				raise NotImplementedError('Parsing %s not implemented' \
 						% repr(d))
 
-class PkgCoreUncondOneOfDep(PMOneOfDep, PkgCoreUncondDep):
+class PkgCoreUncondAnyOfDep(PMAnyOfDep, PkgCoreUncondDep):
 	pass
 
 class PkgCoreUncondAllOfDep(PMAllOfDep, PkgCoreUncondDep):

File gentoopm/portagepm/depend.py

 from portage.dep import paren_reduce, use_reduce
 
 from gentoopm.basepm.depend import PMPackageDepSet, PMConditionalDep, \
-	PMOneOfDep, PMAllOfDep, PMBaseDep
+	PMAnyOfDep, PMAllOfDep, PMBaseDep
 from gentoopm.portagepm.atom import PortageAtom
 
 class PortageBaseDep(PMBaseDep):
 		it = iter(self._deps)
 		for d in it:
 			if d == '||':
-				yield PortageOneOfDep(next(it), self._puse)
+				yield PortageAnyOfDep(next(it), self._puse)
 			elif d == '&&':
 				yield PortageAllOfDep(next(it), self._puse)
 			elif d.endswith('?'):
 			else:
 				yield PortageAtom(d)
 
-class PortageOneOfDep(PMOneOfDep, PortageBaseDep):
+class PortageAnyOfDep(PMAnyOfDep, PortageBaseDep):
 	pass
 
 class PortageAllOfDep(PMAllOfDep, PortageBaseDep):
 		it = iter(self._deps)
 		for d in it:
 			if d == '||':
-				yield PortageUncondOneOfDep(next(it))
+				yield PortageUncondAnyOfDep(next(it))
 			elif d == '&&':
 				yield PortageUncondAllOfDep(next(it))
 			else:
 				yield PortageAtom(d)
 
-class PortageUncondOneOfDep(PMOneOfDep, PortageUncondDep):
+class PortageUncondAnyOfDep(PMAnyOfDep, PortageUncondDep):
 	pass
 
 class PortageUncondAllOfDep(PMAllOfDep, PortageUncondDep):