aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-05-19 18:11:38 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-05-19 18:11:44 +0100
commit8fb5cc6bfdd43b59a3220ff11bfe9a45b46896cd (patch)
tree56e9aff5cffe5c9229c8bc28848c1d5874d2e5c1
parentdce1c03da9ae2ef9016fd5458d7aa706e2aaee3f (diff)
downloadpaludis-8fb5cc6bfdd43b59a3220ff11bfe9a45b46896cd.tar.gz
paludis-8fb5cc6bfdd43b59a3220ff11bfe9a45b46896cd.tar.xz
exheres-0 is phasing out non-ranged deps
-rw-r--r--paludis/elike_package_dep_spec-fwd.hh3
-rw-r--r--paludis/elike_package_dep_spec.cc10
-rw-r--r--paludis/elike_package_dep_spec.se1
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf2
-rw-r--r--paludis/user_dep_spec.cc3
5 files changed, 14 insertions, 5 deletions
diff --git a/paludis/elike_package_dep_spec-fwd.hh b/paludis/elike_package_dep_spec-fwd.hh
index 95d980c..18ca82f 100644
--- a/paludis/elike_package_dep_spec-fwd.hh
+++ b/paludis/elike_package_dep_spec-fwd.hh
@@ -70,7 +70,8 @@ namespace paludis
void elike_remove_trailing_slot_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
- bool elike_has_version_operator(const std::string & s, const bool had_bracket_version_requirements) PALUDIS_VISIBLE;
+ bool elike_has_version_operator(const std::string & s, const bool had_bracket_version_requirements,
+ const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
VersionOperator elike_get_remove_version_operator(std::string & s,
const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
diff --git a/paludis/elike_package_dep_spec.cc b/paludis/elike_package_dep_spec.cc
index 8a45548..183b7d6 100644
--- a/paludis/elike_package_dep_spec.cc
+++ b/paludis/elike_package_dep_spec.cc
@@ -304,12 +304,18 @@ paludis::elike_remove_trailing_slot_if_exists(std::string & s, PartiallyMadePack
}
bool
-paludis::elike_has_version_operator(const std::string & s, const bool had_bracket_version_requirements)
+paludis::elike_has_version_operator(const std::string & s, const bool had_bracket_version_requirements,
+ const ELikePackageDepSpecOptions & options)
{
if ((! s.empty()) && std::string::npos != std::string("<>=~").find(s.at(0)))
{
if (had_bracket_version_requirements)
throw PackageDepSpecError("Cannot mix [] and traditional version specifications");
+
+ if (options[epdso_disallow_nonranged_deps])
+ Log::get_instance()->message("e.package_dep_spec.traditional_version_ops_not_allowed", ll_qa, lc_context)
+ << "Traditional version specifications are deprecated and will soon stop working here";
+
return true;
}
else
@@ -451,7 +457,7 @@ paludis::partial_parse_elike_package_dep_spec(
value_for<n::get_remove_trailing_version>(std::tr1::bind(&elike_get_remove_trailing_version, _1, version_options)),
value_for<n::get_remove_version_operator>(std::tr1::bind(&elike_get_remove_version_operator, _1, options)),
value_for<n::has_version_operator>(std::tr1::bind(&elike_has_version_operator, _1,
- std::tr1::cref(had_bracket_version_requirements))),
+ std::tr1::cref(had_bracket_version_requirements), options)),
value_for<n::remove_trailing_repo_if_exists>(std::tr1::bind(&elike_remove_trailing_repo_if_exists, _1, _2, options)),
value_for<n::remove_trailing_slot_if_exists>(std::tr1::bind(&elike_remove_trailing_slot_if_exists, _1, _2, options)),
value_for<n::remove_trailing_square_bracket_if_exists>(std::tr1::bind(&elike_remove_trailing_square_bracket_if_exists,
diff --git a/paludis/elike_package_dep_spec.se b/paludis/elike_package_dep_spec.se
index 043b3af..7b23ae5 100644
--- a/paludis/elike_package_dep_spec.se
+++ b/paludis/elike_package_dep_spec.se
@@ -15,6 +15,7 @@ make_enum_ELikePackageDepSpecOption()
key epdso_allow_use_dep_defaults "Allow [use+] and [use-] deps"
key epdso_allow_ranged_deps "Allow [op version] deps"
key epdso_allow_tilde_greater_deps "Allow ~> deps"
+ 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"
}
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index c6b81cc..0838c5c 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -8,7 +8,7 @@ can_be_pbin = true
package_dep_spec_parse_options = allow_slot_deps allow_use_deps \
allow_ranged_deps allow_tilde_greater_deps strict_parsing \
allow_slot_equal_deps allow_slot_star_deps allow_use_dep_defaults \
- nice_equal_star
+ nice_equal_star disallow_nonranged_deps
dependency_spec_tree_parse_options = disallow_any_use uri_supports_arrow
iuse_flag_parse_options = strict_parsing
version_spec_options = flexible_dashes flexible_dots ignore_case \
diff --git a/paludis/user_dep_spec.cc b/paludis/user_dep_spec.cc
index 1416b6f..5cc7a25 100644
--- a/paludis/user_dep_spec.cc
+++ b/paludis/user_dep_spec.cc
@@ -297,7 +297,8 @@ paludis::parse_user_package_dep_spec(const std::string & ss, const Environment *
user_version_spec_options())),
value_for<n::get_remove_version_operator>(std::tr1::bind(&elike_get_remove_version_operator, _1,
ELikePackageDepSpecOptions() + epdso_allow_tilde_greater_deps + epdso_nice_equal_star)),
- value_for<n::has_version_operator>(std::tr1::bind(&elike_has_version_operator, _1, std::tr1::cref(had_bracket_version_requirements))),
+ value_for<n::has_version_operator>(std::tr1::bind(&elike_has_version_operator, _1,
+ std::tr1::cref(had_bracket_version_requirements), ELikePackageDepSpecOptions())),
value_for<n::remove_trailing_repo_if_exists>(std::tr1::bind(&user_remove_trailing_repo_if_exists, _1, _2)),
value_for<n::remove_trailing_slot_if_exists>(std::tr1::bind(&user_remove_trailing_slot_if_exists, _1, _2)),
value_for<n::remove_trailing_square_bracket_if_exists>(std::tr1::bind(&user_remove_trailing_square_bracket_if_exists,