aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-12 20:54:16 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-12 20:54:16 +0100
commit3932fa2e349b8f673d60a9a8dfe4d34bdc722fa1 (patch)
tree7d96e38b8977e5d2cfc7879b97e622a0f5d9fd35
parentd0f0c51bc9f2e32436c17bb7ec1d27844d2b852e (diff)
downloadpaludis-3932fa2e349b8f673d60a9a8dfe4d34bdc722fa1.tar.gz
paludis-3932fa2e349b8f673d60a9a8dfe4d34bdc722fa1.tar.xz
Give PackageOrBlockDepSpec its own header
-rw-r--r--paludis/resolver/Makefile.am2
-rw-r--r--paludis/resolver/decider.hh1
-rw-r--r--paludis/resolver/package_or_block_dep_spec-fwd.hh36
-rw-r--r--paludis/resolver/package_or_block_dep_spec.cc160
-rw-r--r--paludis/resolver/package_or_block_dep_spec.hh55
-rw-r--r--paludis/resolver/resolutions.hh8
-rw-r--r--paludis/resolver/resolver.hh1
-rw-r--r--paludis/resolver/resolver_test.hh1
-rw-r--r--paludis/resolver/sanitised_dependencies-fwd.hh9
-rw-r--r--paludis/resolver/sanitised_dependencies.cc125
-rw-r--r--paludis/resolver/sanitised_dependencies.hh18
-rw-r--r--paludis/resolver/spec_rewriter.hh1
12 files changed, 259 insertions, 158 deletions
diff --git a/paludis/resolver/Makefile.am b/paludis/resolver/Makefile.am
index 99051ed..d488be0 100644
--- a/paludis/resolver/Makefile.am
+++ b/paludis/resolver/Makefile.am
@@ -39,6 +39,7 @@ noinst_HEADERS = \
job_state.hh job_state-fwd.hh \
jobs.hh jobs-fwd.hh \
orderer.hh orderer-fwd.hh \
+ package_or_block_dep_spec.hh package_or_block_dep_spec-fwd.hh \
reason.hh reason-fwd.hh \
required_confirmations.hh required_confirmations-fwd.hh \
resolution.hh resolution-fwd.hh \
@@ -69,6 +70,7 @@ libpaludisresolver_a_SOURCES = \
job_state.cc \
jobs.cc \
orderer.cc \
+ package_or_block_dep_spec.cc \
reason.cc \
required_confirmations.cc \
resolution.cc \
diff --git a/paludis/resolver/decider.hh b/paludis/resolver/decider.hh
index 70dd2cc..379d166 100644
--- a/paludis/resolver/decider.hh
+++ b/paludis/resolver/decider.hh
@@ -36,6 +36,7 @@
#include <paludis/resolver/resolver-fwd.hh>
#include <paludis/resolver/any_child_score-fwd.hh>
#include <paludis/resolver/change_type-fwd.hh>
+#include <paludis/resolver/package_or_block_dep_spec-fwd.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/dep_spec-fwd.hh>
diff --git a/paludis/resolver/package_or_block_dep_spec-fwd.hh b/paludis/resolver/package_or_block_dep_spec-fwd.hh
new file mode 100644
index 0000000..89fe528
--- /dev/null
+++ b/paludis/resolver/package_or_block_dep_spec-fwd.hh
@@ -0,0 +1,36 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2010 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
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_PACKAGE_OR_BLOCK_DEP_SPEC_FWD_HH
+#define PALUDIS_GUARD_PALUDIS_RESOLVER_PACKAGE_OR_BLOCK_DEP_SPEC_FWD_HH 1
+
+#include <paludis/util/attributes.hh>
+#include <iosfwd>
+
+namespace paludis
+{
+ namespace resolver
+ {
+ struct PackageOrBlockDepSpec;
+
+ std::ostream & operator<< (std::ostream & s, const PackageOrBlockDepSpec & d) PALUDIS_VISIBLE;
+ }
+}
+
+#endif
diff --git a/paludis/resolver/package_or_block_dep_spec.cc b/paludis/resolver/package_or_block_dep_spec.cc
new file mode 100644
index 0000000..e5c978d
--- /dev/null
+++ b/paludis/resolver/package_or_block_dep_spec.cc
@@ -0,0 +1,160 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2010 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
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <paludis/resolver/package_or_block_dep_spec.hh>
+#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/log.hh>
+#include <paludis/util/map.hh>
+#include <paludis/util/sequence-impl.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
+#include <paludis/serialise-impl.hh>
+#include <paludis/metadata_key.hh>
+#include <paludis/elike_package_dep_spec.hh>
+#include <paludis/elike_annotations.hh>
+#include <ostream>
+
+using namespace paludis;
+using namespace paludis::resolver;
+
+std::ostream &
+paludis::resolver::operator<< (std::ostream & s, const PackageOrBlockDepSpec & d)
+{
+ if (d.if_package())
+ return s << *d.if_package();
+ else
+ return s << *d.if_block();
+}
+
+PackageOrBlockDepSpec::PackageOrBlockDepSpec(const BlockDepSpec & s) :
+ if_block(n::if_block() = make_shared_ptr(new BlockDepSpec(s))),
+ if_package(n::if_package() = make_null_shared_ptr())
+{
+}
+
+PackageOrBlockDepSpec::PackageOrBlockDepSpec(const PackageDepSpec & s) :
+ if_block(n::if_block() = make_null_shared_ptr()),
+ if_package(n::if_package() = make_shared_ptr(new PackageDepSpec(s)))
+{
+}
+
+void
+PackageOrBlockDepSpec::serialise(Serialiser & s) const
+{
+ SerialiserObjectWriter w(s.object("PackageOrBlockDepSpec"));
+
+ std::tr1::shared_ptr<DepSpec> spec;
+ if (if_block())
+ {
+ spec = if_block();
+ w
+ .member(SerialiserFlags<>(), "block", true)
+ .member(SerialiserFlags<>(), "spec", stringify(if_block()->blocking()))
+ .member(SerialiserFlags<>(), "strong", if_block()->strong())
+ .member(SerialiserFlags<>(), "text", if_block()->text())
+ ;
+ }
+ else
+ {
+ spec = if_package();
+ w
+ .member(SerialiserFlags<>(), "block", false)
+ .member(SerialiserFlags<>(), "spec", stringify(*if_package()))
+ ;
+ }
+
+ if (! spec->annotations_key())
+ w.member(SerialiserFlags<>(), "annotations_count", 0);
+ else
+ {
+ int n(0);
+ for (MetadataSectionKey::MetadataConstIterator m(spec->annotations_key()->begin_metadata()),
+ m_end(spec->annotations_key()->end_metadata()) ;
+ m != m_end ; ++m)
+ {
+ const MetadataValueKey<std::string> * k(
+ simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
+ if (! k)
+ {
+ Log::get_instance()->message("resolver.sanitised_dependencies.not_a_string", ll_warning, lc_context)
+ << "Annotation '" << (*m)->raw_name() << "' not a string. This is probably a bug.";
+ continue;
+ }
+
+ w.member(SerialiserFlags<>(), "annotations_k_" + stringify(n), k->human_name());
+ w.member(SerialiserFlags<>(), "annotations_v_" + stringify(n), k->value());
+ ++n;
+ }
+
+ w.member(SerialiserFlags<>(), "annotations_count", stringify(n));
+ }
+}
+
+PackageOrBlockDepSpec
+PackageOrBlockDepSpec::deserialise(Deserialisation & d, const std::tr1::shared_ptr<const PackageID> & for_id)
+{
+ Context context("When deserialising:");
+
+ Deserialisator v(d, "PackageOrBlockDepSpec");
+
+ bool block(v.member<bool>("block"));
+ PackageDepSpec spec(parse_elike_package_dep_spec(v.member<std::string>("spec"),
+ 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_key_requirements +
+ epdso_allow_use_dep_question_defaults,
+ VersionSpecOptions() + vso_flexible_dashes + vso_flexible_dots + vso_ignore_case +
+ vso_letters_anywhere + vso_dotted_suffixes,
+ for_id));
+
+ std::tr1::shared_ptr<MetadataSectionKey> annotations;
+
+ std::tr1::shared_ptr<Map<std::string, std::string> > m(new Map<std::string, std::string>);
+ for (int a(0), a_end(v.member<int>("annotations_count")) ;
+ a != a_end ; ++a)
+ {
+ std::string key(v.member<std::string>("annotations_k_" + stringify(a)));
+ std::string value(v.member<std::string>("annotations_v_" + stringify(a)));
+ m->insert(key, value);
+ }
+
+ if (! m->empty())
+ annotations.reset(new ELikeAnnotations(m));
+
+ if (block)
+ {
+ bool strong(v.member<bool>("strong"));
+ std::string text(v.member<std::string>("text"));
+ BlockDepSpec b_spec(text, spec, strong);
+ if (annotations)
+ b_spec.set_annotations_key(annotations);
+ return PackageOrBlockDepSpec(b_spec);
+ }
+ else
+ {
+ if (annotations)
+ spec.set_annotations_key(annotations);
+ return PackageOrBlockDepSpec(spec);
+ }
+}
+
+template class Sequence<PackageOrBlockDepSpec>;
+template class WrappedForwardIterator<Sequence<PackageOrBlockDepSpec>::ConstIteratorTag, const PackageOrBlockDepSpec>;
+
diff --git a/paludis/resolver/package_or_block_dep_spec.hh b/paludis/resolver/package_or_block_dep_spec.hh
new file mode 100644
index 0000000..48a35de
--- /dev/null
+++ b/paludis/resolver/package_or_block_dep_spec.hh
@@ -0,0 +1,55 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2010 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
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_PACKAGE_OR_BLOCK_DEP_SPEC_HH
+#define PALUDIS_GUARD_PALUDIS_RESOLVER_PACKAGE_OR_BLOCK_DEP_SPEC_HH 1
+
+#include <paludis/resolver/package_or_block_dep_spec-fwd.hh>
+#include <paludis/util/named_value.hh>
+#include <paludis/dep_spec.hh>
+#include <paludis/serialise-fwd.hh>
+
+namespace paludis
+{
+ namespace n
+ {
+ typedef Name<struct if_package_name> if_package;
+ typedef Name<struct if_block_name> if_block;
+ }
+
+ namespace resolver
+ {
+ struct PackageOrBlockDepSpec
+ {
+ NamedValue<n::if_block, std::tr1::shared_ptr<BlockDepSpec> > if_block;
+ NamedValue<n::if_package, std::tr1::shared_ptr<PackageDepSpec> > if_package;
+
+ PackageOrBlockDepSpec(const BlockDepSpec &);
+ PackageOrBlockDepSpec(const PackageDepSpec &);
+
+ void serialise(Serialiser &) const;
+
+ static PackageOrBlockDepSpec deserialise(
+ Deserialisation & d,
+ const std::tr1::shared_ptr<const PackageID> & for_id) PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+ }
+}
+
+#endif
diff --git a/paludis/resolver/resolutions.hh b/paludis/resolver/resolutions.hh
index 119557c..5e865ef 100644
--- a/paludis/resolver/resolutions.hh
+++ b/paludis/resolver/resolutions.hh
@@ -30,14 +30,6 @@
namespace paludis
{
- namespace n
- {
- typedef Name<struct all_name> all;
- typedef Name<struct errors_name> errors;
- typedef Name<struct ordered_name> ordered;
- typedef Name<struct untaken_name> untaken;
- }
-
namespace resolver
{
class PALUDIS_VISIBLE Resolutions :
diff --git a/paludis/resolver/resolver.hh b/paludis/resolver/resolver.hh
index ce3fd1b..53368ef 100644
--- a/paludis/resolver/resolver.hh
+++ b/paludis/resolver/resolver.hh
@@ -28,6 +28,7 @@
#include <paludis/resolver/resolutions-fwd.hh>
#include <paludis/resolver/resolver_lists-fwd.hh>
#include <paludis/resolver/sanitised_dependencies-fwd.hh>
+#include <paludis/resolver/package_or_block_dep_spec-fwd.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/package_id-fwd.hh>
#include <paludis/dep_spec-fwd.hh>
diff --git a/paludis/resolver/resolver_test.hh b/paludis/resolver/resolver_test.hh
index 61ec179..589f6e7 100644
--- a/paludis/resolver/resolver_test.hh
+++ b/paludis/resolver/resolver_test.hh
@@ -33,6 +33,7 @@
#include <paludis/resolver/jobs-fwd.hh>
#include <paludis/resolver/resolver_functions-fwd.hh>
#include <paludis/resolver/required_confirmations-fwd.hh>
+#include <paludis/resolver/package_or_block_dep_spec-fwd.hh>
#include <paludis/repositories/fake/fake_installed_repository.hh>
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
diff --git a/paludis/resolver/sanitised_dependencies-fwd.hh b/paludis/resolver/sanitised_dependencies-fwd.hh
index e04ec68..1f80164 100644
--- a/paludis/resolver/sanitised_dependencies-fwd.hh
+++ b/paludis/resolver/sanitised_dependencies-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009 Ciaran McCreesh
+ * Copyright (c) 2009, 2010 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,19 +20,12 @@
#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_SANITISED_DEPENDENCIES_FWD_HH
#define PALUDIS_GUARD_PALUDIS_RESOLVER_SANITISED_DEPENDENCIES_FWD_HH 1
-#include <paludis/util/attributes.hh>
-#include <iosfwd>
-
namespace paludis
{
namespace resolver
{
struct SanitisedDependencies;
struct SanitisedDependency;
-
- struct PackageOrBlockDepSpec;
-
- std::ostream & operator<< (std::ostream & s, const PackageOrBlockDepSpec & d) PALUDIS_VISIBLE;
}
}
diff --git a/paludis/resolver/sanitised_dependencies.cc b/paludis/resolver/sanitised_dependencies.cc
index c46a2a3..c525f52 100644
--- a/paludis/resolver/sanitised_dependencies.cc
+++ b/paludis/resolver/sanitised_dependencies.cc
@@ -488,128 +488,6 @@ SanitisedDependencies::end() const
return ConstIterator(_imp->sanitised_dependencies.end());
}
-std::ostream &
-paludis::resolver::operator<< (std::ostream & s, const PackageOrBlockDepSpec & d)
-{
- if (d.if_package())
- return s << *d.if_package();
- else
- return s << *d.if_block();
-}
-
-PackageOrBlockDepSpec::PackageOrBlockDepSpec(const BlockDepSpec & s) :
- if_block(n::if_block() = make_shared_ptr(new BlockDepSpec(s))),
- if_package(n::if_package() = make_null_shared_ptr())
-{
-}
-
-PackageOrBlockDepSpec::PackageOrBlockDepSpec(const PackageDepSpec & s) :
- if_block(n::if_block() = make_null_shared_ptr()),
- if_package(n::if_package() = make_shared_ptr(new PackageDepSpec(s)))
-{
-}
-
-void
-PackageOrBlockDepSpec::serialise(Serialiser & s) const
-{
- SerialiserObjectWriter w(s.object("PackageOrBlockDepSpec"));
-
- std::tr1::shared_ptr<DepSpec> spec;
- if (if_block())
- {
- spec = if_block();
- w
- .member(SerialiserFlags<>(), "block", true)
- .member(SerialiserFlags<>(), "spec", stringify(if_block()->blocking()))
- .member(SerialiserFlags<>(), "strong", if_block()->strong())
- .member(SerialiserFlags<>(), "text", if_block()->text())
- ;
- }
- else
- {
- spec = if_package();
- w
- .member(SerialiserFlags<>(), "block", false)
- .member(SerialiserFlags<>(), "spec", stringify(*if_package()))
- ;
- }
-
- if (! spec->annotations_key())
- w.member(SerialiserFlags<>(), "annotations_count", 0);
- else
- {
- int n(0);
- for (MetadataSectionKey::MetadataConstIterator m(spec->annotations_key()->begin_metadata()),
- m_end(spec->annotations_key()->end_metadata()) ;
- m != m_end ; ++m)
- {
- const MetadataValueKey<std::string> * k(
- simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
- if (! k)
- {
- Log::get_instance()->message("resolver.sanitised_dependencies.not_a_string", ll_warning, lc_context)
- << "Annotation '" << (*m)->raw_name() << "' not a string. This is probably a bug.";
- continue;
- }
-
- w.member(SerialiserFlags<>(), "annotations_k_" + stringify(n), k->human_name());
- w.member(SerialiserFlags<>(), "annotations_v_" + stringify(n), k->value());
- ++n;
- }
-
- w.member(SerialiserFlags<>(), "annotations_count", stringify(n));
- }
-}
-
-PackageOrBlockDepSpec
-PackageOrBlockDepSpec::deserialise(Deserialisation & d, const std::tr1::shared_ptr<const PackageID> & for_id)
-{
- Context context("When deserialising:");
-
- Deserialisator v(d, "PackageOrBlockDepSpec");
-
- bool block(v.member<bool>("block"));
- PackageDepSpec spec(parse_elike_package_dep_spec(v.member<std::string>("spec"),
- 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_key_requirements +
- epdso_allow_use_dep_question_defaults,
- VersionSpecOptions() + vso_flexible_dashes + vso_flexible_dots + vso_ignore_case +
- vso_letters_anywhere + vso_dotted_suffixes,
- for_id));
-
- std::tr1::shared_ptr<MetadataSectionKey> annotations;
-
- std::tr1::shared_ptr<Map<std::string, std::string> > m(new Map<std::string, std::string>);
- for (int a(0), a_end(v.member<int>("annotations_count")) ;
- a != a_end ; ++a)
- {
- std::string key(v.member<std::string>("annotations_k_" + stringify(a)));
- std::string value(v.member<std::string>("annotations_v_" + stringify(a)));
- m->insert(key, value);
- }
-
- if (! m->empty())
- annotations.reset(new ELikeAnnotations(m));
-
- if (block)
- {
- bool strong(v.member<bool>("strong"));
- std::string text(v.member<std::string>("text"));
- BlockDepSpec b_spec(text, spec, strong);
- if (annotations)
- b_spec.set_annotations_key(annotations);
- return PackageOrBlockDepSpec(b_spec);
- }
- else
- {
- if (annotations)
- spec.set_annotations_key(annotations);
- return PackageOrBlockDepSpec(spec);
- }
-}
-
void
SanitisedDependency::serialise(Serialiser & s) const
{
@@ -640,8 +518,5 @@ SanitisedDependency::deserialise(Deserialisation & d, const std::tr1::shared_ptr
);
}
-template class Sequence<PackageOrBlockDepSpec>;
-template class WrappedForwardIterator<Sequence<PackageOrBlockDepSpec>::ConstIteratorTag, const PackageOrBlockDepSpec>;
-
template class WrappedForwardIterator<SanitisedDependencies::ConstIteratorTag, const SanitisedDependency>;
diff --git a/paludis/resolver/sanitised_dependencies.hh b/paludis/resolver/sanitised_dependencies.hh
index 5f09815..c57b0c3 100644
--- a/paludis/resolver/sanitised_dependencies.hh
+++ b/paludis/resolver/sanitised_dependencies.hh
@@ -23,6 +23,7 @@
#include <paludis/resolver/sanitised_dependencies-fwd.hh>
#include <paludis/resolver/decider-fwd.hh>
#include <paludis/resolver/resolvent-fwd.hh>
+#include <paludis/resolver/package_or_block_dep_spec.hh>
#include <paludis/util/named_value.hh>
#include <paludis/dep_label-fwd.hh>
#include <paludis/dep_spec.hh>
@@ -36,8 +37,6 @@ namespace paludis
{
typedef Name<struct active_dependency_labels_name> active_dependency_labels;
typedef Name<struct active_dependency_labels_as_string_name> active_dependency_labels_as_string;
- typedef Name<struct if_package_name> if_package;
- typedef Name<struct if_block_name> if_block;
typedef Name<struct metadata_key_human_name_name> metadata_key_human_name;
typedef Name<struct metadata_key_raw_name_name> metadata_key_raw_name;
typedef Name<struct original_specs_as_string_name> original_specs_as_string;
@@ -46,21 +45,6 @@ namespace paludis
namespace resolver
{
- struct PackageOrBlockDepSpec
- {
- NamedValue<n::if_block, std::tr1::shared_ptr<BlockDepSpec> > if_block;
- NamedValue<n::if_package, std::tr1::shared_ptr<PackageDepSpec> > if_package;
-
- PackageOrBlockDepSpec(const BlockDepSpec &);
- PackageOrBlockDepSpec(const PackageDepSpec &);
-
- void serialise(Serialiser &) const;
-
- static PackageOrBlockDepSpec deserialise(
- Deserialisation & d,
- const std::tr1::shared_ptr<const PackageID> & for_id) PALUDIS_ATTRIBUTE((warn_unused_result));
- };
-
struct SanitisedDependency
{
NamedValue<n::active_dependency_labels, std::tr1::shared_ptr<const DependenciesLabelSequence> > active_dependency_labels;
diff --git a/paludis/resolver/spec_rewriter.hh b/paludis/resolver/spec_rewriter.hh
index 49ef77f..df0f531 100644
--- a/paludis/resolver/spec_rewriter.hh
+++ b/paludis/resolver/spec_rewriter.hh
@@ -23,6 +23,7 @@
#include <paludis/resolver/spec_rewriter-fwd.hh>
#include <paludis/resolver/sanitised_dependencies-fwd.hh>
#include <paludis/resolver/resolvent-fwd.hh>
+#include <paludis/resolver/package_or_block_dep_spec-fwd.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/named_value.hh>
#include <paludis/util/sequence-fwd.hh>