aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-03 19:46:21 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-03 19:46:21 +0100
commitc84e8ac46c84423d3c8fbe891ca20fba5a8b5335 (patch)
tree13e3d398a13bca83d0fe30f2074adaea4b1236b0
parent0c7d469028ea2f6b68695dece1b38cc8010d531f (diff)
downloadpaludis-c84e8ac46c84423d3c8fbe891ca20fba5a8b5335.tar.gz
paludis-c84e8ac46c84423d3c8fbe891ca20fba5a8b5335.tar.xz
epdso_allow_key_requirements for serialisation
-rw-r--r--paludis/elike_package_dep_spec.cc17
-rw-r--r--paludis/elike_package_dep_spec.se1
-rw-r--r--paludis/resolver/sanitised_dependencies.cc4
-rw-r--r--paludis/resolver/serialise.cc2
4 files changed, 21 insertions, 3 deletions
diff --git a/paludis/elike_package_dep_spec.cc b/paludis/elike_package_dep_spec.cc
index 0082830..7459e7a 100644
--- a/paludis/elike_package_dep_spec.cc
+++ b/paludis/elike_package_dep_spec.cc
@@ -28,6 +28,7 @@
#include <paludis/version_operator.hh>
#include <paludis/version_spec.hh>
#include <paludis/version_requirements.hh>
+#include <paludis/user_dep_spec.hh>
#include <strings.h>
using namespace paludis;
@@ -183,6 +184,22 @@ paludis::elike_remove_trailing_square_bracket_if_exists(std::string & s, Partial
}
break;
+ case '.':
+ {
+ if (! options[epdso_allow_key_requirements])
+ {
+ if (options[epdso_strict_parsing])
+ throw PackageDepSpecError("Key requirements not safe for use here");
+ else
+ Log::get_instance()->message("e.package_dep_spec.key_not_allowed", ll_warning, lc_context)
+ << "Key requirements not safe for use here";
+ }
+ std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirement> req(new UserKeyRequirement(flag.substr(1)));
+ result.additional_requirement(req);
+ }
+ break;
+
+
default:
if (! options[epdso_allow_use_deps] && ! options[epdso_allow_use_deps_portage])
{
diff --git a/paludis/elike_package_dep_spec.se b/paludis/elike_package_dep_spec.se
index 7b23ae5..bc55366 100644
--- a/paludis/elike_package_dep_spec.se
+++ b/paludis/elike_package_dep_spec.se
@@ -18,5 +18,6 @@ make_enum_ELikePackageDepSpecOption()
key epdso_disallow_nonranged_deps "Disallow >=foo/bar-1 deps"
key epdso_nice_equal_star "Make =* do something sensible"
key epdso_strict_parsing "Error rather than warn for violations"
+ key epdso_allow_key_requirements "Allow [.key=value] requirements. \since 0.40"
}
diff --git a/paludis/resolver/sanitised_dependencies.cc b/paludis/resolver/sanitised_dependencies.cc
index 020c783..3c346da 100644
--- a/paludis/resolver/sanitised_dependencies.cc
+++ b/paludis/resolver/sanitised_dependencies.cc
@@ -443,7 +443,7 @@ PackageOrBlockDepSpec::deserialise(Deserialisation & d, const std::tr1::shared_p
ELikePackageDepSpecOptions() + epdso_allow_tilde_greater_deps + epdso_nice_equal_star +
epdso_allow_ranged_deps + epdso_allow_use_deps + epdso_allow_use_deps_portage +
epdso_allow_use_dep_defaults + epdso_allow_repository_deps + epdso_allow_slot_star_deps +
- epdso_allow_slot_equal_deps + epdso_allow_slot_deps,
+ epdso_allow_slot_equal_deps + epdso_allow_slot_deps + epdso_allow_key_requirements,
VersionSpecOptions() + vso_flexible_dashes + vso_flexible_dots + vso_ignore_case +
vso_letters_anywhere + vso_dotted_suffixes,
for_id));
@@ -453,7 +453,7 @@ PackageOrBlockDepSpec::deserialise(Deserialisation & d, const std::tr1::shared_p
ELikePackageDepSpecOptions() + epdso_allow_tilde_greater_deps + epdso_nice_equal_star +
epdso_allow_ranged_deps + epdso_allow_use_deps + epdso_allow_use_deps_portage +
epdso_allow_use_dep_defaults + epdso_allow_repository_deps + epdso_allow_slot_star_deps +
- epdso_allow_slot_equal_deps + epdso_allow_slot_deps,
+ epdso_allow_slot_equal_deps + epdso_allow_slot_deps + epdso_allow_key_requirements,
VersionSpecOptions() + vso_flexible_dashes + vso_flexible_dots + vso_ignore_case +
vso_letters_anywhere + vso_dotted_suffixes,
for_id)))));
diff --git a/paludis/resolver/serialise.cc b/paludis/resolver/serialise.cc
index d98931d..877234f 100644
--- a/paludis/resolver/serialise.cc
+++ b/paludis/resolver/serialise.cc
@@ -351,7 +351,7 @@ DeserialisatorHandler<std::tr1::shared_ptr<const PackageID> >::handle(Deserialis
ELikePackageDepSpecOptions() + epdso_allow_tilde_greater_deps + epdso_nice_equal_star +
epdso_allow_ranged_deps + epdso_allow_use_deps + epdso_allow_use_deps_portage +
epdso_allow_use_dep_defaults + epdso_allow_repository_deps + epdso_allow_slot_star_deps +
- epdso_allow_slot_equal_deps + epdso_allow_slot_deps,
+ epdso_allow_slot_equal_deps + epdso_allow_slot_deps + epdso_allow_key_requirements,
VersionSpecOptions() + vso_flexible_dashes + vso_flexible_dots + vso_ignore_case +
vso_letters_anywhere + vso_dotted_suffixes,
make_null_shared_ptr()), MatchPackageOptions()))]->begin();