aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-04 08:19:18 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-04 08:33:00 +0100
commit6d8fa49055b5c43117d98c020187be9bfa4fb2c6 (patch)
tree1f8d90310bbac90838dce4f082fd4c8fa4e04942 /python
parent508e7564e1d8d1de765d4d517bc899b7ef137716 (diff)
downloadpaludis-6d8fa49055b5c43117d98c020187be9bfa4fb2c6.tar.gz
paludis-6d8fa49055b5c43117d98c020187be9bfa4fb2c6.tar.xz
Use reqs to constraints
Diffstat (limited to 'python')
-rw-r--r--python/dep_spec.cc24
-rw-r--r--python/dep_spec.hh3
2 files changed, 13 insertions, 14 deletions
diff --git a/python/dep_spec.cc b/python/dep_spec.cc
index 939fbeceb..6f8c0ec8e 100644
--- a/python/dep_spec.cc
+++ b/python/dep_spec.cc
@@ -82,8 +82,8 @@ namespace paludis
std::shared_ptr<const ExactSlotConstraint> exact_slot;
std::shared_ptr<const InRepositoryConstraint> in_repository;
std::shared_ptr<const FromRepositoryConstraint> from_repository;
- std::shared_ptr<const AdditionalPackageDepSpecRequirements> additional_requirements;
std::shared_ptr<const KeyConstraintSequence> all_keys;
+ std::shared_ptr<const ChoiceConstraintSequence> all_choices;
const std::string str;
Imp(
@@ -95,8 +95,8 @@ namespace paludis
const std::shared_ptr<const ExactSlotConstraint> & xs,
const std::shared_ptr<const InRepositoryConstraint> & ri,
const std::shared_ptr<const FromRepositoryConstraint> & rf,
- const std::shared_ptr<const AdditionalPackageDepSpecRequirements> & u,
const std::shared_ptr<const KeyConstraintSequence> & k,
+ const std::shared_ptr<const ChoiceConstraintSequence> & a,
const std::string & st) :
package_name_constraint(q),
category_name_part_constraint(c),
@@ -106,8 +106,8 @@ namespace paludis
exact_slot(xs),
in_repository(ri),
from_repository(rf),
- additional_requirements(u),
all_keys(k),
+ all_choices(a),
str(st)
{
}
@@ -235,8 +235,8 @@ PythonPackageDepSpec::PythonPackageDepSpec(const PackageDepSpec & p) :
p.exact_slot_constraint(),
p.in_repository_constraint(),
p.from_repository_constraint(),
- p.additional_requirements_ptr(),
p.all_key_constraints(),
+ p.all_choice_constraints(),
stringify(p))
{
}
@@ -252,8 +252,8 @@ PythonPackageDepSpec::PythonPackageDepSpec(const PythonPackageDepSpec & p) :
p.exact_slot_constraint(),
p.in_repository_constraint(),
p.from_repository_constraint(),
- p.additional_requirements_ptr(),
p.all_key_constraints(),
+ p.all_choice_constraints(),
p.py_str())
{
}
@@ -294,11 +294,11 @@ PythonPackageDepSpec::operator PackageDepSpec() const
if (from_repository_constraint())
p.from_repository(from_repository_constraint()->name());
- if (additional_requirements_ptr())
+ if (all_choice_constraints())
{
- for (AdditionalPackageDepSpecRequirements::ConstIterator i(additional_requirements_ptr()->begin()),
- i_end(additional_requirements_ptr()->end()) ; i != i_end ; ++i)
- p.additional_requirement(*i);
+ for (ChoiceConstraintSequence::ConstIterator i(all_choice_constraints()->begin()),
+ i_end(all_choice_constraints()->end()) ; i != i_end ; ++i)
+ p.choice_constraint(*i);
}
if (all_key_constraints())
@@ -365,10 +365,10 @@ PythonPackageDepSpec::from_repository_constraint() const
return _imp->from_repository;
}
-std::shared_ptr<const AdditionalPackageDepSpecRequirements>
-PythonPackageDepSpec::additional_requirements_ptr() const
+const std::shared_ptr<const ChoiceConstraintSequence>
+PythonPackageDepSpec::all_choice_constraints() const
{
- return _imp->additional_requirements;
+ return _imp->all_choices;
}
const std::shared_ptr<const KeyConstraintSequence>
diff --git a/python/dep_spec.hh b/python/dep_spec.hh
index 4c6b28f8d..ab1b30e24 100644
--- a/python/dep_spec.hh
+++ b/python/dep_spec.hh
@@ -181,8 +181,7 @@ namespace paludis
const std::shared_ptr<const ExactSlotConstraint> exact_slot_constraint() const;
const std::shared_ptr<const AnySlotConstraint> any_slot_constraint() const;
const std::shared_ptr<const KeyConstraintSequence> all_key_constraints() const;
-
- std::shared_ptr<const AdditionalPackageDepSpecRequirements> additional_requirements_ptr() const;
+ const std::shared_ptr<const ChoiceConstraintSequence> all_choice_constraints() const;
std::string py_str() const;
};