aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-03-22 16:59:49 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-03-22 16:59:49 +0000
commit23b923117c499e8aec0d61a530912304b962ad2d (patch)
tree02b0e226d63492e782ed11ff051fa1ad1a4949c2
parent882ff24ed3f781c70369045e5c394333cab4a0c0 (diff)
downloadpaludis-23b923117c499e8aec0d61a530912304b962ad2d.tar.gz
paludis-23b923117c499e8aec0d61a530912304b962ad2d.tar.xz
Fix CRAN, Gems for versionspec changes
-rw-r--r--paludis/repositories/cran/cran_package_id.cc6
-rw-r--r--paludis/repositories/cran/package_dep_spec.cc5
-rw-r--r--paludis/repositories/gems/gem_specification.cc2
-rw-r--r--paludis/repositories/gems/gem_specification_TEST.cc3
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc4
5 files changed, 11 insertions, 9 deletions
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index 18c8ecb..e36c876 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -81,7 +81,7 @@ namespace paludis
repository(r),
cran_repository(r),
name("cran/" + cran_name_to_internal(strip_trailing_string(f.basename(), ".DESCRIPTION"))),
- version("0"),
+ version("0", VersionSpecOptions()),
suggests_labels(new DependencyLabelSequence),
depends_labels(new DependencyLabelSequence)
{
@@ -153,14 +153,14 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::tr1::shar
{
Context local_context("When handling Version: key:");
Log::get_instance()->message("cran.id.broken", ll_warning, lc_context) << "No Version: key in '" << stringify(f) << "'";
- _imp->version = VersionSpec("0");
+ _imp->version = VersionSpec("0", VersionSpecOptions());
add_mask(make_shared_ptr(new BrokenMask('B', "Broken", "No Version: key")));
return;
}
else
{
Context local_context("When handling Version: key:");
- _imp->version = VersionSpec(cran_version_to_internal(file.get("Version")));
+ _imp->version = VersionSpec(cran_version_to_internal(file.get("Version")), VersionSpecOptions());
}
if (! file.get("License").empty())
diff --git a/paludis/repositories/cran/package_dep_spec.cc b/paludis/repositories/cran/package_dep_spec.cc
index 927490c..73f3733 100644
--- a/paludis/repositories/cran/package_dep_spec.cc
+++ b/paludis/repositories/cran/package_dep_spec.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -25,6 +25,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/options.hh>
#include <paludis/dep_spec.hh>
#include <paludis/version_operator.hh>
#include <paludis/version_spec.hh>
@@ -196,7 +197,7 @@ paludis::cranrepository::parse_cran_package_dep_spec(const std::string & ss)
throw PackageDepSpecError("Invalid () entry '" + *t + "' in '" + ss + "'");
data->version_requirement(make_named_values<VersionRequirement>(
value_for<n::version_operator>(VersionOperator(subtokens[0])),
- value_for<n::version_spec>(VersionSpec(cran_version_to_internal(subtokens[1])))));
+ value_for<n::version_spec>(VersionSpec(cran_version_to_internal(subtokens[1]), VersionSpecOptions()))));
}
}
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index a05161d..a574559 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -324,7 +324,7 @@ GemSpecification::name() const
const VersionSpec
GemSpecification::version() const
{
- return VersionSpec(_imp->version);
+ return VersionSpec(_imp->version, VersionSpecOptions());
}
const std::tr1::shared_ptr<const Repository>
diff --git a/paludis/repositories/gems/gem_specification_TEST.cc b/paludis/repositories/gems/gem_specification_TEST.cc
index bf9ae0d..505ed48 100644
--- a/paludis/repositories/gems/gem_specification_TEST.cc
+++ b/paludis/repositories/gems/gem_specification_TEST.cc
@@ -24,6 +24,7 @@
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/set.hh>
+#include <paludis/util/options.hh>
#include <paludis/name.hh>
#include <paludis/metadata_key.hh>
#include <paludis/version_spec.hh>
@@ -63,7 +64,7 @@ namespace test_cases
TEST_CHECK(spec.short_description_key());
TEST_CHECK_EQUAL(spec.short_description_key()->value(), "This is the summary");
TEST_CHECK_EQUAL(spec.name(), QualifiedPackageName("gems/demo"));
- TEST_CHECK_EQUAL(spec.version(), VersionSpec("1.2.3"));
+ TEST_CHECK_EQUAL(spec.version(), VersionSpec("1.2.3", VersionSpecOptions()));
TEST_CHECK(spec.find_metadata("rubyforge_project") == spec.end_metadata());
TEST_CHECK(spec.long_description_key());
TEST_CHECK_EQUAL(spec.long_description_key()->value(), "A longer description");
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index 903f1d0..a7026ba 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -247,7 +247,7 @@ InstalledGemsRepository::need_ids() const
continue;
}
- VersionSpec v(s.substr(h + 1));
+ VersionSpec v(s.substr(h + 1), VersionSpecOptions());
PackageNamePart p(s.substr(0, h));
pkgs->insert(gems + p);