aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/cran
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-09 13:46:00 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-09 13:46:00 +0000
commit4231af5178d647d8ad932decfcf6a437bec63365 (patch)
treebb0d7168d1aff08b6c087bd1aca0f42f8a33e1ed /paludis/repositories/cran
parent6cf45c1cfa4bf675095a244693b9dbfd5e08daca (diff)
downloadpaludis-4231af5178d647d8ad932decfcf6a437bec63365.tar.gz
paludis-4231af5178d647d8ad932decfcf6a437bec63365.tar.xz
New easier tree visitors
Diffstat (limited to 'paludis/repositories/cran')
-rw-r--r--paludis/repositories/cran/cran_dep_parser.cc16
-rw-r--r--paludis/repositories/cran/cran_dep_parser.hh5
-rw-r--r--paludis/repositories/cran/cran_dep_parser_TEST.cc13
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc17
-rw-r--r--paludis/repositories/cran/cran_installed_repository.hh2
-rw-r--r--paludis/repositories/cran/cran_package_id.cc1
-rw-r--r--paludis/repositories/cran/cran_repository.cc12
-rw-r--r--paludis/repositories/cran/cran_repository.hh2
-rw-r--r--paludis/repositories/cran/dep_spec_pretty_printer.cc43
-rw-r--r--paludis/repositories/cran/dep_spec_pretty_printer.hh22
-rw-r--r--paludis/repositories/cran/keys.cc11
-rw-r--r--paludis/repositories/cran/keys.hh2
-rw-r--r--paludis/repositories/cran/masks.cc1
13 files changed, 76 insertions, 71 deletions
diff --git a/paludis/repositories/cran/cran_dep_parser.cc b/paludis/repositories/cran/cran_dep_parser.cc
index e48ef79a8..4961c478d 100644
--- a/paludis/repositories/cran/cran_dep_parser.cc
+++ b/paludis/repositories/cran/cran_dep_parser.cc
@@ -18,26 +18,26 @@
*/
#include <paludis/dep_spec.hh>
+#include <paludis/spec_tree.hh>
#include <paludis/repositories/cran/cran_dep_parser.hh>
#include <paludis/repositories/cran/normalise.hh>
#include <paludis/repositories/cran/package_dep_spec.hh>
-#include <paludis/util/visitor-impl.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/make_shared_ptr.hh>
#include <string>
#include <list>
using namespace paludis;
-std::tr1::shared_ptr<DependencySpecTree::ConstItem>
+std::tr1::shared_ptr<DependencySpecTree>
cranrepository::parse_depends(const std::string & s)
{
Context context("When parsing CRAN 'Depends:' string: '" + s + "':");
- std::tr1::shared_ptr<ConstTreeSequence<DependencySpecTree, AllDepSpec> > result(
- new ConstTreeSequence<DependencySpecTree, AllDepSpec>(std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
+ std::tr1::shared_ptr<DependencySpecTree> result(new DependencySpecTree(make_shared_ptr(new AllDepSpec)));
std::list<std::string> specs;
@@ -67,11 +67,9 @@ cranrepository::parse_depends(const std::string & s)
{
Context local_context("When processing token '" + *a + "':");
- std::tr1::shared_ptr<TreeLeaf<DependencySpecTree, PackageDepSpec> > spec(
- new TreeLeaf<DependencySpecTree, PackageDepSpec>(std::tr1::shared_ptr<PackageDepSpec>(
- new PackageDepSpec(cranrepository::parse_cran_package_dep_spec(
- strip_leading(strip_trailing(*a, " \r\n\t"), " \r\n\t"))))));
- result->add(spec);
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(cranrepository::parse_cran_package_dep_spec(
+ strip_leading(strip_trailing(*a, " \r\n\t"), " \r\n\t"))));
+ result->root()->append(spec);
}
return result;
diff --git a/paludis/repositories/cran/cran_dep_parser.hh b/paludis/repositories/cran/cran_dep_parser.hh
index eadede504..5e8a15c5e 100644
--- a/paludis/repositories/cran/cran_dep_parser.hh
+++ b/paludis/repositories/cran/cran_dep_parser.hh
@@ -21,14 +21,15 @@
#ifndef PALUDIS_GUARD_PALUDIS_CRAN_DEP_PARSER_HH
#define PALUDIS_GUARD_PALUDIS_CRAN_DEP_PARSER_HH 1
-#include <paludis/dep_tree.hh>
+#include <paludis/dep_spec.hh>
+#include <paludis/spec_tree-fwd.hh>
#include <string>
namespace paludis
{
namespace cranrepository
{
- std::tr1::shared_ptr<DependencySpecTree::ConstItem> parse_depends(const std::string & s) PALUDIS_VISIBLE;
+ std::tr1::shared_ptr<DependencySpecTree> parse_depends(const std::string & s) PALUDIS_VISIBLE;
}
}
diff --git a/paludis/repositories/cran/cran_dep_parser_TEST.cc b/paludis/repositories/cran/cran_dep_parser_TEST.cc
index 777ef2ace..677859e0b 100644
--- a/paludis/repositories/cran/cran_dep_parser_TEST.cc
+++ b/paludis/repositories/cran/cran_dep_parser_TEST.cc
@@ -23,7 +23,6 @@
#include <paludis/repositories/cran/dep_spec_pretty_printer.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/visitor-impl.hh>
#include <paludis/stringify_formatter.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
@@ -45,29 +44,29 @@ namespace test_cases
// test R dependency
std::string dep1("R (>= 2.0.0)");
- cranrepository::parse_depends(dep1)->accept(d1);
+ cranrepository::parse_depends(dep1)->root()->accept(d1);
TEST_CHECK_EQUAL(stringify(d1), "R (>= 2.0.0)");
// test varying whitespaces
std::string dep2("testpackage1 \t(<1.9)");
- cranrepository::parse_depends(dep2)->accept(d2);
+ cranrepository::parse_depends(dep2)->root()->accept(d2);
TEST_CHECK_EQUAL(stringify(d2), "testpackage1 (< 1.9)");
// test for package-name and version normalisation
std::string dep3("R.matlab (>= 2.3-1)");
- cranrepository::parse_depends(dep3)->accept(d3);
+ cranrepository::parse_depends(dep3)->root()->accept(d3);
TEST_CHECK_EQUAL(stringify(d3), "R.matlab (>= 2.3.1)");
std::string dep4("foo (>= 2, <3)");
- cranrepository::parse_depends(dep4)->accept(d4);
+ cranrepository::parse_depends(dep4)->root()->accept(d4);
TEST_CHECK_EQUAL(stringify(d4), "foo (>= 2, < 3)");
std::string dep5("foo (>= 2), bar (<=3)");
- cranrepository::parse_depends(dep5)->accept(d5);
+ cranrepository::parse_depends(dep5)->root()->accept(d5);
TEST_CHECK_EQUAL(stringify(d5), "foo (>= 2), bar (<= 3)");
std::string dep6("foo (>= 2, <= 4), bar (<=3)");
- cranrepository::parse_depends(dep6)->accept(d6);
+ cranrepository::parse_depends(dep6)->root()->accept(d6);
TEST_CHECK_EQUAL(stringify(d6), "foo (>= 2, <= 4), bar (<= 3)");
}
} test_cran_dep_parser;
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 43ce5dcab..ec4c4f98f 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006, 2007 Danny van Dyk
- * 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
@@ -42,9 +42,9 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/tokeniser.hh>
-#include <paludis/util/visitor-impl.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
#include <tr1/functional>
#include <tr1/unordered_map>
#include <functional>
@@ -445,7 +445,7 @@ CRANInstalledRepository::do_uninstall(const QualifiedPackageName & q, const Vers
}
#endif
-std::tr1::shared_ptr<SetSpecTree::ConstItem>
+const std::tr1::shared_ptr<const SetSpecTree>
CRANInstalledRepository::package_set(const SetName & s) const
{
Context context("When fetching package set '" + stringify(s) + "' from '" +
@@ -453,24 +453,21 @@ CRANInstalledRepository::package_set(const SetName & s) const
if ("everything" == s.data())
{
- std::tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > result(new ConstTreeSequence<SetSpecTree, AllDepSpec>(
- std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
+ std::tr1::shared_ptr<SetSpecTree> result(new SetSpecTree(make_shared_ptr(new AllDepSpec)));
need_ids();
for (IDMap::const_iterator p(_imp->ids.begin()), p_end(_imp->ids.end()) ;
p != p_end ; ++p)
{
- std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> > spec(
- new TreeLeaf<SetSpecTree, PackageDepSpec>(make_shared_ptr(
- new PackageDepSpec(cranrepository::parse_cran_package_dep_spec(stringify(p->first.package()))))));
- result->add(spec);
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(cranrepository::parse_cran_package_dep_spec(stringify(p->first.package()))));
+ result->root()->append(spec);
}
return result;
}
else
- return std::tr1::shared_ptr<SetSpecTree::ConstItem>();
+ return make_null_shared_ptr();
}
std::tr1::shared_ptr<const SetNameSet>
diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh
index f7a63dc23..80b36273e 100644
--- a/paludis/repositories/cran/cran_installed_repository.hh
+++ b/paludis/repositories/cran/cran_installed_repository.hh
@@ -149,7 +149,7 @@ namespace paludis
/* RepositorySetsInterface */
- virtual std::tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName & id) const
+ virtual const std::tr1::shared_ptr<const SetSpecTree> package_set(const SetName & id) const
PALUDIS_ATTRIBUTE((warn_unused_result));
/* Keys */
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index e2ea74cc1..60c71f777 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -39,7 +39,6 @@
#include <paludis/action.hh>
#include <paludis/dep_label.hh>
#include <paludis/util/tokeniser.hh>
-#include <paludis/util/visitor-impl.hh>
#include <string>
#include <algorithm>
#include <list>
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 44cd46d25..553f1cfc0 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006, 2007 Danny van Dyk
- * 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
@@ -42,10 +42,11 @@
#include <paludis/util/system.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/is_file_with_extension.hh>
-#include <paludis/util/visitor-impl.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/output_deviator.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/syncer.hh>
#include <tr1/unordered_map>
#include <tr1/functional>
@@ -341,7 +342,7 @@ CRANRepository::do_install(const std::tr1::shared_ptr<const PackageID> & id_unca
}
#endif
-std::tr1::shared_ptr<SetSpecTree::ConstItem>
+const std::tr1::shared_ptr<const SetSpecTree>
CRANRepository::package_set(const SetName & s) const
{
if ("base" == s.data())
@@ -350,11 +351,10 @@ CRANRepository::package_set(const SetName & s) const
* \todo Implement system as all package which are installed
* by dev-lang/R by default.
*/
- return std::tr1::shared_ptr<SetSpecTree::ConstItem>(new ConstTreeSequence<SetSpecTree, AllDepSpec>(
- std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
+ return make_shared_ptr(new SetSpecTree(make_shared_ptr(new AllDepSpec)));
}
else
- return std::tr1::shared_ptr<SetSpecTree::ConstItem>();
+ return make_null_shared_ptr();
}
std::tr1::shared_ptr<const SetNameSet>
diff --git a/paludis/repositories/cran/cran_repository.hh b/paludis/repositories/cran/cran_repository.hh
index b84c1fdad..6d458af2b 100644
--- a/paludis/repositories/cran/cran_repository.hh
+++ b/paludis/repositories/cran/cran_repository.hh
@@ -128,7 +128,7 @@ namespace paludis
/* RepositorySyncableInterface */
- virtual std::tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName &) const;
+ virtual const std::tr1::shared_ptr<const SetSpecTree> package_set(const SetName &) const;
virtual std::tr1::shared_ptr<const SetNameSet> sets_list() const;
diff --git a/paludis/repositories/cran/dep_spec_pretty_printer.cc b/paludis/repositories/cran/dep_spec_pretty_printer.cc
index e369a1ac7..3445c35cb 100644
--- a/paludis/repositories/cran/dep_spec_pretty_printer.cc
+++ b/paludis/repositories/cran/dep_spec_pretty_printer.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
@@ -20,7 +20,6 @@
#include <paludis/repositories/cran/dep_spec_pretty_printer.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/visitor-impl.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/options.hh>
#include <paludis/environment.hh>
@@ -73,7 +72,7 @@ DepSpecPrettyPrinter::~DepSpecPrettyPrinter()
}
void
-DepSpecPrettyPrinter::visit_leaf(const PackageDepSpec & p)
+DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node)
{
if (_imp->multiline)
_imp->s << _imp->formatter.indent(_imp->indent);
@@ -84,34 +83,52 @@ DepSpecPrettyPrinter::visit_leaf(const PackageDepSpec & p)
if (_imp->env)
{
- if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p, MatchPackageOptions()) |
+ if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*node.spec(), MatchPackageOptions()) |
filter::InstalledAtRoot(_imp->env->root()))]->empty())
- _imp->s << _imp->formatter.format(p, format::Installed());
- else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(p, MatchPackageOptions()) |
+ _imp->s << _imp->formatter.format(*node.spec(), format::Installed());
+ else if (! (*_imp->env)[selection::SomeArbitraryVersion(generator::Matches(*node.spec(), MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() | filter::NotMasked())]->empty())
- _imp->s << _imp->formatter.format(p, format::Installable());
+ _imp->s << _imp->formatter.format(*node.spec(), format::Installable());
else
- _imp->s << _imp->formatter.format(p, format::Plain());
+ _imp->s << _imp->formatter.format(*node.spec(), format::Plain());
}
else
- _imp->s << _imp->formatter.format(p, format::Plain());
+ _imp->s << _imp->formatter.format(*node.spec(), format::Plain());
if (_imp->multiline)
_imp->s << _imp->formatter.newline();
}
void
-DepSpecPrettyPrinter::visit_leaf(const BlockDepSpec &)
+DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<AllDepSpec>::Type & node)
{
+ std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()), accept_visitor(*this));
}
void
-DepSpecPrettyPrinter::visit_leaf(const DependencyLabelsDepSpec &)
+DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<AnyDepSpec>::Type & node)
{
+ std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()), accept_visitor(*this));
}
void
-DepSpecPrettyPrinter::visit_leaf(const NamedSetDepSpec & p)
+DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node)
+{
+ std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()), accept_visitor(*this));
+}
+
+void
+DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type &)
+{
+}
+
+void
+DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+{
+}
+
+void
+DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::Type & node)
{
if (_imp->multiline)
_imp->s << _imp->formatter.indent(_imp->indent);
@@ -120,7 +137,7 @@ DepSpecPrettyPrinter::visit_leaf(const NamedSetDepSpec & p)
else
_imp->need_comma = true;
- _imp->s << _imp->formatter.format(p, format::Plain());
+ _imp->s << _imp->formatter.format(*node.spec(), format::Plain());
if (_imp->multiline)
_imp->s << _imp->formatter.newline();
diff --git a/paludis/repositories/cran/dep_spec_pretty_printer.hh b/paludis/repositories/cran/dep_spec_pretty_printer.hh
index a343961a8..12a72999e 100644
--- a/paludis/repositories/cran/dep_spec_pretty_printer.hh
+++ b/paludis/repositories/cran/dep_spec_pretty_printer.hh
@@ -21,7 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_CRAN_DEP_SPEC_PRETTY_PRINTER_HH 1
#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/dep_tree.hh>
+#include <paludis/spec_tree.hh>
#include <paludis/dep_spec-fwd.hh>
#include <paludis/formatter.hh>
#include <paludis/environment-fwd.hh>
@@ -37,11 +37,7 @@ namespace paludis
* \ingroup grpcranrepository
*/
class PALUDIS_VISIBLE DepSpecPrettyPrinter :
- private PrivateImplementationPattern<DepSpecPrettyPrinter>,
- public ConstVisitor<DependencySpecTree>,
- public ConstVisitor<DependencySpecTree>::VisitConstSequence<DepSpecPrettyPrinter, AllDepSpec>,
- public ConstVisitor<DependencySpecTree>::VisitConstSequence<DepSpecPrettyPrinter, ConditionalDepSpec>,
- public ConstVisitor<DependencySpecTree>::VisitConstSequence<DepSpecPrettyPrinter, AnyDepSpec>
+ private PrivateImplementationPattern<DepSpecPrettyPrinter>
{
friend std::ostream & operator<< (std::ostream &, const DepSpecPrettyPrinter &);
@@ -74,13 +70,13 @@ namespace paludis
///\}
- void visit_leaf(const PackageDepSpec &);
-
- void visit_leaf(const BlockDepSpec &);
-
- void visit_leaf(const DependencyLabelsDepSpec &);
-
- void visit_leaf(const NamedSetDepSpec &);
+ void visit(const DependencySpecTree::NodeType<AllDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<AnyDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::Type & node);
};
std::ostream & operator<< (std::ostream & s, const DepSpecPrettyPrinter & p) PALUDIS_VISIBLE;
diff --git a/paludis/repositories/cran/keys.cc b/paludis/repositories/cran/keys.cc
index f6a8cfc40..a8ad2bf21 100644
--- a/paludis/repositories/cran/keys.cc
+++ b/paludis/repositories/cran/keys.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
@@ -27,7 +27,6 @@
#include <paludis/util/join.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/visitor-impl.hh>
#include <paludis/util/set.hh>
#include <paludis/dep_spec.hh>
#include <paludis/stringify_formatter-impl.hh>
@@ -106,7 +105,7 @@ namespace paludis
const std::string v;
mutable Mutex mutex;
- mutable std::tr1::shared_ptr<const DependencySpecTree::ConstItem> c;
+ mutable std::tr1::shared_ptr<const DependencySpecTree> c;
const std::tr1::shared_ptr<const DependencyLabelSequence> labels;
Implementation(const Environment * const e, const std::string & vv,
@@ -131,7 +130,7 @@ DepKey::~DepKey()
{
}
-const std::tr1::shared_ptr<const DependencySpecTree::ConstItem>
+const std::tr1::shared_ptr<const DependencySpecTree>
DepKey::value() const
{
Lock l(_imp->mutex);
@@ -148,7 +147,7 @@ DepKey::pretty_print(const DependencySpecTree::ItemFormatter & f) const
{
StringifyFormatter ff(f);
DepSpecPrettyPrinter p(_imp->env, ff, 12, true);
- value()->accept(p);
+ value()->root()->accept(p);
return stringify(p);
}
@@ -157,7 +156,7 @@ DepKey::pretty_print_flat(const DependencySpecTree::ItemFormatter & f) const
{
StringifyFormatter ff(f);
DepSpecPrettyPrinter p(_imp->env, ff, 0, false);
- value()->accept(p);
+ value()->root()->accept(p);
return stringify(p);
}
diff --git a/paludis/repositories/cran/keys.hh b/paludis/repositories/cran/keys.hh
index dfcfd3fb3..004c5a896 100644
--- a/paludis/repositories/cran/keys.hh
+++ b/paludis/repositories/cran/keys.hh
@@ -81,7 +81,7 @@ namespace paludis
~DepKey();
- virtual const std::tr1::shared_ptr<const DependencySpecTree::ConstItem> value() const
+ virtual const std::tr1::shared_ptr<const DependencySpecTree> value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::string pretty_print(const DependencySpecTree::ItemFormatter &) const
diff --git a/paludis/repositories/cran/masks.cc b/paludis/repositories/cran/masks.cc
index f498ff853..6850cec58 100644
--- a/paludis/repositories/cran/masks.cc
+++ b/paludis/repositories/cran/masks.cc
@@ -19,7 +19,6 @@
#include "masks.hh"
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/visitor-impl.hh>
using namespace paludis;
using namespace paludis::cranrepository;