aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-05-19 21:09:05 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-05-19 21:09:05 +0100
commitc1a470d25af8d37269144b3a5df228962919790f (patch)
tree5bc9eccca4914e08da4e55703a2a095cb61e4a34
parent8fb5cc6bfdd43b59a3220ff11bfe9a45b46896cd (diff)
downloadpaludis-c1a470d25af8d37269144b3a5df228962919790f.tar.gz
paludis-c1a470d25af8d37269144b3a5df228962919790f.tar.xz
Preserve whether we hate non-ranged deps
-rw-r--r--doc/api/cplusplus/examples/example_action.cc2
-rw-r--r--doc/api/cplusplus/examples/example_contents.cc2
-rw-r--r--doc/api/cplusplus/examples/example_formatter.cc2
-rw-r--r--doc/api/cplusplus/examples/example_mask.cc2
-rw-r--r--doc/api/cplusplus/examples/example_match_package.cc3
-rw-r--r--doc/api/cplusplus/examples/example_metadata_key.cc2
-rw-r--r--doc/api/cplusplus/examples/example_package_id.cc2
-rw-r--r--doc/api/cplusplus/examples/example_selection.cc12
-rw-r--r--doc/api/cplusplus/examples/example_stringify_formatter.cc2
-rw-r--r--paludis/dep_list.cc7
-rw-r--r--paludis/dep_spec-fwd.hh15
-rw-r--r--paludis/dep_spec.cc44
-rw-r--r--paludis/dep_spec.hh11
-rw-r--r--paludis/dep_spec.se19
-rw-r--r--paludis/dep_spec_TEST.cc4
-rw-r--r--paludis/elike_package_dep_spec.cc15
-rw-r--r--paludis/elike_package_dep_spec.hh4
-rw-r--r--paludis/files.m42
-rw-r--r--paludis/install_task.cc2
-rw-r--r--paludis/package_database.cc4
-rw-r--r--paludis/range_rewriter.cc6
-rw-r--r--paludis/report_task.cc2
-rw-r--r--paludis/repositories/accounts/accounts_dep_key.cc2
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc3
-rw-r--r--paludis/repositories/cran/package_dep_spec.cc5
-rw-r--r--paludis/repositories/e/e_installed_repository.cc3
-rw-r--r--paludis/repositories/e/e_repository_sets.cc4
-rw-r--r--paludis/repositories/e/qa/visibility.cc2
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc3
-rw-r--r--paludis/repositories/virtuals/package_id.cc4
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc4
-rw-r--r--paludis/set_file.cc2
-rw-r--r--paludis/uninstall_task.cc5
-rw-r--r--paludis/user_dep_spec.cc8
-rw-r--r--python/dep_spec.cc2
-rw-r--r--src/clients/adjutrix/downgrade_check.cc2
-rw-r--r--src/clients/adjutrix/keywords_graph.cc2
-rw-r--r--src/clients/cave/cmd_show.cc2
-rw-r--r--src/clients/inquisitio/do_search.cc2
-rw-r--r--src/clients/reconcilio/fix_linkage.cc2
-rw-r--r--src/output/console_install_task.cc12
41 files changed, 166 insertions, 67 deletions
diff --git a/doc/api/cplusplus/examples/example_action.cc b/doc/api/cplusplus/examples/example_action.cc
index 6e84a45..3fe9caa 100644
--- a/doc/api/cplusplus/examples/example_action.cc
+++ b/doc/api/cplusplus/examples/example_action.cc
@@ -51,7 +51,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()))]);
+ generator::Package(QualifiedPackageName("sys-apps/paludis")))]);
/* For each ID: */
for (PackageIDSet::ConstIterator i(ids->begin()), i_end(ids->end()) ;
diff --git a/doc/api/cplusplus/examples/example_contents.cc b/doc/api/cplusplus/examples/example_contents.cc
index b2ad342..57381fe 100644
--- a/doc/api/cplusplus/examples/example_contents.cc
+++ b/doc/api/cplusplus/examples/example_contents.cc
@@ -71,7 +71,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for installed 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
+ generator::Package(QualifiedPackageName("sys-apps/paludis")) |
filter::SupportsAction<InstalledAction>())]);
/* For each ID: */
diff --git a/doc/api/cplusplus/examples/example_formatter.cc b/doc/api/cplusplus/examples/example_formatter.cc
index 1025717..9714ac3 100644
--- a/doc/api/cplusplus/examples/example_formatter.cc
+++ b/doc/api/cplusplus/examples/example_formatter.cc
@@ -170,7 +170,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for installable 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
+ generator::Package(QualifiedPackageName("sys-apps/paludis")) |
filter::SupportsAction<InstallAction>())]);
/* Write nice valid XHTML, because we're good like that. */
diff --git a/doc/api/cplusplus/examples/example_mask.cc b/doc/api/cplusplus/examples/example_mask.cc
index 9a312bf..ddc0152 100644
--- a/doc/api/cplusplus/examples/example_mask.cc
+++ b/doc/api/cplusplus/examples/example_mask.cc
@@ -84,7 +84,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()))]);
+ generator::Package(QualifiedPackageName("sys-apps/paludis")))]);
/* For each ID: */
for (PackageIDSet::ConstIterator i(ids->begin()), i_end(ids->end()) ;
diff --git a/doc/api/cplusplus/examples/example_match_package.cc b/doc/api/cplusplus/examples/example_match_package.cc
index 4a96dbc..21b5346 100644
--- a/doc/api/cplusplus/examples/example_match_package.cc
+++ b/doc/api/cplusplus/examples/example_match_package.cc
@@ -53,7 +53,8 @@ int main(int argc, char * argv[])
i != i_end ; ++i)
{
/* Is it paludis? */
- if (match_package(*env, make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), **i, MatchPackageOptions()))
+ if (match_package(*env, make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(
+ QualifiedPackageName("sys-apps/paludis")), **i, MatchPackageOptions()))
cout << left << setw(50) << (stringify(**i) + ":") << " " << "paludis" << endl;
/* No. Is it in system or world? */
diff --git a/doc/api/cplusplus/examples/example_metadata_key.cc b/doc/api/cplusplus/examples/example_metadata_key.cc
index 63a1b52..9ba53f8 100644
--- a/doc/api/cplusplus/examples/example_metadata_key.cc
+++ b/doc/api/cplusplus/examples/example_metadata_key.cc
@@ -267,7 +267,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()))]);
+ generator::Package(QualifiedPackageName("sys-apps/paludis")))]);
/* For each ID: */
for (PackageIDSet::ConstIterator i(ids->begin()), i_end(ids->end()) ;
diff --git a/doc/api/cplusplus/examples/example_package_id.cc b/doc/api/cplusplus/examples/example_package_id.cc
index 8066870..d05846b 100644
--- a/doc/api/cplusplus/examples/example_package_id.cc
+++ b/doc/api/cplusplus/examples/example_package_id.cc
@@ -47,7 +47,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()))]);
+ generator::Package(QualifiedPackageName("sys-apps/paludis")))]);
/* For each ID: */
for (PackageIDSet::ConstIterator i(ids->begin()), i_end(ids->end()) ;
diff --git a/doc/api/cplusplus/examples/example_selection.cc b/doc/api/cplusplus/examples/example_selection.cc
index 38a2a55..05f299d 100644
--- a/doc/api/cplusplus/examples/example_selection.cc
+++ b/doc/api/cplusplus/examples/example_selection.cc
@@ -62,19 +62,22 @@ int main(int argc, char * argv[])
* object used determines the number and ordering of results. In the
* simplest form, it takes a Generator as a parameter. */
show_selection(env, selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions())));
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(
+ QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions())));
/* Generators can be passed through a Filter. The Selection optimises
* the code internally to avoid doing excess work. */
show_selection(env, selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(
+ QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
filter::SupportsAction<InstalledAction>()));
/* Filters can be combined. Usually filter::NotMasked should be combined
* with filter::SupportsAction<InstallAction>, since installed packages
* aren't masked. */
show_selection(env, selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(
+ QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() |
filter::NotMasked()));
@@ -82,7 +85,8 @@ int main(int argc, char * argv[])
* is no metadata cache. Consider using other Selection objects if
* you only need the best matching or some arbitrary matching ID. */
show_selection(env, selection::BestVersionOnly(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(
+ QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
filter::SupportsAction<InstallAction>() |
filter::NotMasked()));
}
diff --git a/doc/api/cplusplus/examples/example_stringify_formatter.cc b/doc/api/cplusplus/examples/example_stringify_formatter.cc
index 232d753..cf2f580 100644
--- a/doc/api/cplusplus/examples/example_stringify_formatter.cc
+++ b/doc/api/cplusplus/examples/example_stringify_formatter.cc
@@ -39,7 +39,7 @@ int main(int argc, char * argv[])
/* Fetch package IDs for installable 'sys-apps/paludis'. */
std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis")), MatchPackageOptions()) |
+ generator::Package(QualifiedPackageName("sys-apps/paludis")) |
filter::SupportsAction<InstallAction>())]);
/* For each ID: */
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 01ac85a..170f8e0 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -828,7 +828,8 @@ DepList::AddVisitor::visit(const DependencySpecTree::NodeType<BlockDepSpec>::Typ
if (node.spec()->blocked_spec()->package_ptr())
{
- PackageDepSpec just_package(make_package_dep_spec().package(*node.spec()->blocked_spec()->package_ptr()));
+ PackageDepSpec just_package(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(
+ *node.spec()->blocked_spec()->package_ptr()));
already_installed = (*d->_imp->env)[selection::AllVersionsUnsorted(
generator::Matches(just_package, d->_imp->opts->match_package_options()) |
filter::SupportsAction<InstalledAction>())];
@@ -1139,7 +1140,7 @@ DepList::add_package(const std::tr1::shared_ptr<const PackageID> & p, const std:
for (DepSpecFlattener<ProvideSpecTree, PackageDepSpec>::ConstIterator i(f.begin()), i_end(f.end()) ; i != i_end ; ++i)
{
- std::tr1::shared_ptr<PackageDepSpec> pp(new PackageDepSpec(make_package_dep_spec()
+ std::tr1::shared_ptr<PackageDepSpec> pp(new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package(*(*i)->package_ptr())
.version_requirement(make_named_values<VersionRequirement>(
value_for<n::version_operator>(vo_equal),
@@ -1662,7 +1663,7 @@ DepList::replaced(const PackageID & m) const
std::pair<MergeListIndex::const_iterator, MergeListIndex::const_iterator> p(
_imp->merge_list_index.equal_range(m.name()));
- PackageDepSpec spec(make_package_dep_spec().package(m.name()));
+ PackageDepSpec spec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(m.name()));
while (p.second != ((p.first = std::find_if(p.first, p.second,
MatchDepListEntryAgainstPackageDepSpec(_imp->env, spec, _imp->opts->match_package_options())))))
{
diff --git a/paludis/dep_spec-fwd.hh b/paludis/dep_spec-fwd.hh
index 668dab1..792856f 100644
--- a/paludis/dep_spec-fwd.hh
+++ b/paludis/dep_spec-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 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,6 +27,7 @@
#include <paludis/formatter-fwd.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/sequence-fwd.hh>
+#include <paludis/util/options-fwd.hh>
#include <tr1/memory>
/** \file
@@ -52,6 +53,16 @@ namespace paludis
class PlainTextLabelDepSpec;
template <typename T_> class LabelsDepSpec;
+#include <paludis/dep_spec-se.hh>
+
+ /**
+ * Options for PartiallyMadePackageDepSpec.
+ *
+ * \ingroup g_dep_spec
+ * \since 0.38
+ */
+ typedef Options<PartiallyMadePackageDepSpecOption> PartiallyMadePackageDepSpecOptions;
+
/**
* A URILabelsDepSpec represents labels in a FetchableURISpecTree.
*
@@ -101,7 +112,7 @@ namespace paludis
* \ingroup g_dep_spec
* \since 0.26
*/
- PartiallyMadePackageDepSpec make_package_dep_spec() PALUDIS_VISIBLE;
+ PartiallyMadePackageDepSpec make_package_dep_spec(const PartiallyMadePackageDepSpecOptions &) PALUDIS_VISIBLE;
/**
* A PlainTextDepSpec can be written to an ostream.
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc
index bfcb1d4..d285a54 100644
--- a/paludis/dep_spec.cc
+++ b/paludis/dep_spec.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 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
@@ -44,6 +44,8 @@
using namespace paludis;
+#include <paludis/dep_spec-se.cc>
+
namespace paludis
{
template <>
@@ -719,7 +721,7 @@ PackageDepSpec::without_additional_requirements() const
{
using namespace std::tr1::placeholders;
- PartiallyMadePackageDepSpec result;
+ PartiallyMadePackageDepSpec result(data()->options_for_partially_made_package_dep_spec());
if (package_ptr())
result.package(*package_ptr());
@@ -801,9 +803,9 @@ paludis::operator<< (std::ostream & s, const AdditionalPackageDepSpecRequirement
}
PartiallyMadePackageDepSpec
-paludis::make_package_dep_spec()
+paludis::make_package_dep_spec(const PartiallyMadePackageDepSpecOptions & o)
{
- return PartiallyMadePackageDepSpec();
+ return PartiallyMadePackageDepSpec(o);
}
namespace
@@ -824,10 +826,12 @@ namespace
std::tr1::shared_ptr<const InstallableToPath> installable_to_path;
std::tr1::shared_ptr<AdditionalPackageDepSpecRequirements> additional_requirements;
std::tr1::shared_ptr<const MetadataSectionKey> annotations;
+ PartiallyMadePackageDepSpecOptions options_for_partially_made_package_dep_spec_v;
- PartiallyMadePackageDepSpecData() :
+ PartiallyMadePackageDepSpecData(const PartiallyMadePackageDepSpecOptions & o) :
PackageDepSpecData(),
- version_requirements_mode_v(vr_and)
+ version_requirements_mode_v(vr_and),
+ options_for_partially_made_package_dep_spec_v(o)
{
}
@@ -845,7 +849,8 @@ namespace
installed_at_path(other.installed_at_path_ptr()),
installable_to_path(other.installable_to_path_ptr()),
additional_requirements(other.additional_requirements_ptr() ? new AdditionalPackageDepSpecRequirements : 0),
- annotations(other.annotations_key())
+ annotations(other.annotations_key()),
+ options_for_partially_made_package_dep_spec_v(other.options_for_partially_made_package_dep_spec())
{
if (version_requirements)
std::copy(other.version_requirements_ptr()->begin(), other.version_requirements_ptr()->end(),
@@ -870,7 +875,8 @@ namespace
installed_at_path(other.installed_at_path),
installable_to_path(other.installable_to_path),
additional_requirements(other.additional_requirements),
- annotations(other.annotations)
+ annotations(other.annotations),
+ options_for_partially_made_package_dep_spec_v(other.options_for_partially_made_package_dep_spec_v)
{
}
@@ -883,7 +889,8 @@ namespace
if (version_requirements_ptr()->begin() == version_requirements_ptr()->end())
{
}
- else if (next(version_requirements_ptr()->begin()) == version_requirements_ptr()->end())
+ else if (next(version_requirements_ptr()->begin()) == version_requirements_ptr()->end() &&
+ ! options_for_partially_made_package_dep_spec_v[pmpdso_always_use_ranged_deps])
{
if (version_requirements_ptr()->begin()->version_operator() == vo_stupid_equal_star || version_requirements_ptr()->begin()->version_operator() == vo_nice_equal_star)
s << "=";
@@ -914,7 +921,8 @@ namespace
if (version_requirements_ptr()->begin() == version_requirements_ptr()->end())
{
}
- else if (next(version_requirements_ptr()->begin()) == version_requirements_ptr()->end())
+ else if (next(version_requirements_ptr()->begin()) == version_requirements_ptr()->end() &&
+ ! options_for_partially_made_package_dep_spec_v[pmpdso_always_use_ranged_deps])
{
s << "-" << version_requirements_ptr()->begin()->version_spec();
if (version_requirements_ptr()->begin()->version_operator() == vo_stupid_equal_star || version_requirements_ptr()->begin()->version_operator() == vo_nice_equal_star)
@@ -982,7 +990,8 @@ namespace
if (version_requirements_ptr()->begin() == version_requirements_ptr()->end())
{
}
- else if (next(version_requirements_ptr()->begin()) == version_requirements_ptr()->end())
+ else if (next(version_requirements_ptr()->begin()) == version_requirements_ptr()->end() &&
+ ! options_for_partially_made_package_dep_spec_v[pmpdso_always_use_ranged_deps])
{
}
else
@@ -1101,6 +1110,11 @@ namespace
{
return annotations;
}
+
+ virtual const PartiallyMadePackageDepSpecOptions options_for_partially_made_package_dep_spec() const
+ {
+ return options_for_partially_made_package_dep_spec_v;
+ }
};
}
@@ -1111,8 +1125,8 @@ namespace paludis
{
std::tr1::shared_ptr<PartiallyMadePackageDepSpecData> data;
- Implementation() :
- data(new PartiallyMadePackageDepSpecData)
+ Implementation(const PartiallyMadePackageDepSpecOptions & o) :
+ data(new PartiallyMadePackageDepSpecData(o))
{
}
@@ -1128,8 +1142,8 @@ namespace paludis
};
}
-PartiallyMadePackageDepSpec::PartiallyMadePackageDepSpec() :
- PrivateImplementationPattern<PartiallyMadePackageDepSpec>(new Implementation<PartiallyMadePackageDepSpec>)
+PartiallyMadePackageDepSpec::PartiallyMadePackageDepSpec(const PartiallyMadePackageDepSpecOptions & o) :
+ PrivateImplementationPattern<PartiallyMadePackageDepSpec>(new Implementation<PartiallyMadePackageDepSpec>(o))
{
}
diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh
index 60a76c4..5055ea4 100644
--- a/paludis/dep_spec.hh
+++ b/paludis/dep_spec.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 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
@@ -361,7 +361,7 @@ namespace paludis
///\name Basic operations
///\{
- PartiallyMadePackageDepSpec();
+ PartiallyMadePackageDepSpec(const PartiallyMadePackageDepSpecOptions &);
~PartiallyMadePackageDepSpec();
PartiallyMadePackageDepSpec(const PackageDepSpec &);
PartiallyMadePackageDepSpec(const PartiallyMadePackageDepSpec &);
@@ -687,6 +687,13 @@ namespace paludis
* Fetch the annotations (may be a zero pointer).
*/
virtual std::tr1::shared_ptr<const MetadataSectionKey> annotations_key() const = 0;
+
+ /**
+ * Fetch options if we're being used to construct a new PartiallyMadePackageDepSpec.
+ *
+ * \since 0.38
+ */
+ virtual const PartiallyMadePackageDepSpecOptions options_for_partially_made_package_dep_spec() const = 0;
};
/**
diff --git a/paludis/dep_spec.se b/paludis/dep_spec.se
new file mode 100644
index 0000000..ed3550a
--- /dev/null
+++ b/paludis/dep_spec.se
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et ft=sh :
+
+make_enum_PartiallyMadePackageDepSpecOption()
+{
+ prefix pmpdso
+
+ key pmpdso_always_use_ranged_deps "Always write [>=1] style dependencies"
+
+ doxygen_comment << "END"
+ /**
+ * Options for PartiallyMadePackageDepSpec.
+ *
+ * \ingroup g_dep_spec
+ * \since 0.38
+ */
+END
+}
+
diff --git a/paludis/dep_spec_TEST.cc b/paludis/dep_spec_TEST.cc
index 3af1e98..e9d96e5 100644
--- a/paludis/dep_spec_TEST.cc
+++ b/paludis/dep_spec_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 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
@@ -41,7 +41,7 @@ namespace test_cases
void run()
{
- std::tr1::shared_ptr<PackageDepSpec> x(new PackageDepSpec(make_package_dep_spec()));
+ std::tr1::shared_ptr<PackageDepSpec> x(new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())));
TEST_CHECK(0 == x->as_conditional_dep_spec());
}
} test_dep_spec_as;
diff --git a/paludis/elike_package_dep_spec.cc b/paludis/elike_package_dep_spec.cc
index 183b7d6..2eadbd2 100644
--- a/paludis/elike_package_dep_spec.cc
+++ b/paludis/elike_package_dep_spec.cc
@@ -43,7 +43,7 @@ paludis::partial_parse_generic_elike_package_dep_spec(const std::string & ss, co
fns.check_sanity()(ss);
std::string s(ss);
- PartiallyMadePackageDepSpec result;
+ PartiallyMadePackageDepSpec result(fns.options_for_partially_made_package_dep_spec()());
/* Remove trailing [use], [version] etc parts. */
while (fns.remove_trailing_square_bracket_if_exists()(s, result))
@@ -438,6 +438,14 @@ paludis::elike_add_package_requirement(const std::string & s, PartiallyMadePacka
result.package(QualifiedPackageName(s));
}
+namespace
+{
+ const PartiallyMadePackageDepSpecOptions fixed_options_for_partially_made_package_dep_spec(PartiallyMadePackageDepSpecOptions o)
+ {
+ return o;
+ }
+}
+
PartiallyMadePackageDepSpec
paludis::partial_parse_elike_package_dep_spec(
const std::string & ss, const ELikePackageDepSpecOptions & options,
@@ -450,6 +458,10 @@ paludis::partial_parse_elike_package_dep_spec(
bool had_bracket_version_requirements(false), had_use_requirements(false);
+ PartiallyMadePackageDepSpecOptions o;
+ if (options[epdso_disallow_nonranged_deps])
+ o += pmpdso_always_use_ranged_deps;
+
return partial_parse_generic_elike_package_dep_spec(ss, make_named_values<GenericELikePackageDepSpecParseFunctions>(
value_for<n::add_package_requirement>(std::tr1::bind(&elike_add_package_requirement, _1, _2)),
value_for<n::add_version_requirement>(std::tr1::bind(&elike_add_version_requirement, _1, _2, _3)),
@@ -458,6 +470,7 @@ paludis::partial_parse_elike_package_dep_spec(
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), options)),
+ value_for<n::options_for_partially_made_package_dep_spec>(std::tr1::bind(&fixed_options_for_partially_made_package_dep_spec, o)),
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.hh b/paludis/elike_package_dep_spec.hh
index 97dfd38..752b8cb 100644
--- a/paludis/elike_package_dep_spec.hh
+++ b/paludis/elike_package_dep_spec.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 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
@@ -33,6 +33,7 @@ namespace paludis
struct get_remove_trailing_version;
struct get_remove_version_operator;
struct has_version_operator;
+ struct options_for_partially_made_package_dep_spec;
struct remove_trailing_repo_if_exists;
struct remove_trailing_slot_if_exists;
struct remove_trailing_square_bracket_if_exists;
@@ -46,6 +47,7 @@ namespace paludis
NamedValue<n::get_remove_trailing_version, std::tr1::function<VersionSpec (std::string &)> > get_remove_trailing_version;
NamedValue<n::get_remove_version_operator, std::tr1::function<VersionOperator (std::string &)> > get_remove_version_operator;
NamedValue<n::has_version_operator, std::tr1::function<bool (const std::string &)> > has_version_operator;
+ NamedValue<n::options_for_partially_made_package_dep_spec, std::tr1::function<const PartiallyMadePackageDepSpecOptions ()> > options_for_partially_made_package_dep_spec;
NamedValue<n::remove_trailing_repo_if_exists, std::tr1::function<void (std::string &, PartiallyMadePackageDepSpec &)> > remove_trailing_repo_if_exists;
NamedValue<n::remove_trailing_slot_if_exists, std::tr1::function<void (std::string &, PartiallyMadePackageDepSpec &)> > remove_trailing_slot_if_exists;
NamedValue<n::remove_trailing_square_bracket_if_exists, std::tr1::function<bool (std::string &, PartiallyMadePackageDepSpec &)> > remove_trailing_square_bracket_if_exists;
diff --git a/paludis/files.m4 b/paludis/files.m4
index 7e76c4e..838ec32 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -18,7 +18,7 @@ add(`dep_label', `hh', `cc', `fwd')
add(`dep_list', `hh', `cc', `fwd', `test', `fwd')
add(`dep_list_exceptions', `hh', `cc')
add(`dep_list_options', `hh', `cc', `se')
-add(`dep_spec', `hh', `cc', `test', `fwd')
+add(`dep_spec', `hh', `cc', `test', `fwd', `se')
add(`dep_spec_flattener', `hh', `cc')
add(`dep_tag', `hh', `cc', `fwd')
add(`distribution', `hh', `cc', `impl', `fwd')
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index cbff30e..fc02875 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -533,7 +533,7 @@ InstallTask::_add_package_id(const std::tr1::shared_ptr<const PackageID> & targe
if (! _imp->override_target_type)
_imp->dep_list.options()->target_type() = dl_target_package;
- PartiallyMadePackageDepSpec part_spec;
+ PartiallyMadePackageDepSpec part_spec((PartiallyMadePackageDepSpecOptions()));
part_spec.package(target->name());
part_spec.in_repository(target->repository()->name());
part_spec.version_requirement(make_named_values<VersionRequirement>(
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index 9743971..68ef2ef 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 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
@@ -245,7 +245,7 @@ PackageDatabase::fetch_unique_qualified_package_name(const PackageNamePart & p,
std::set<std::pair<CategoryNamePart, RepositoryName>, CategoryRepositoryNamePairComparator> checked;
std::tr1::shared_ptr<const PackageIDSequence> pkgs((*_imp->environment)[selection::AllVersionsUnsorted(
- generator::Matches(make_package_dep_spec().package_name_part(p), MatchPackageOptions()) | f)]);
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package_name_part(p), MatchPackageOptions()) | f)]);
for (IndirectIterator<PackageIDSequence::ConstIterator> it(pkgs->begin()),
it_end(pkgs->end()); it_end != it; ++it)
diff --git a/paludis/range_rewriter.cc b/paludis/range_rewriter.cc
index 75bf675..a659f94 100644
--- a/paludis/range_rewriter.cc
+++ b/paludis/range_rewriter.cc
@@ -28,6 +28,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/options.hh>
#include <paludis/dep_spec.hh>
#include <list>
#include <sstream>
@@ -187,6 +188,11 @@ namespace
{
return make_null_shared_ptr();
}
+
+ virtual const PartiallyMadePackageDepSpecOptions options_for_partially_made_package_dep_spec() const
+ {
+ return PartiallyMadePackageDepSpecOptions() + pmpdso_always_use_ranged_deps;
+ }
};
}
diff --git a/paludis/report_task.cc b/paludis/report_task.cc
index 618a8f8..9590529 100644
--- a/paludis/report_task.cc
+++ b/paludis/report_task.cc
@@ -219,7 +219,7 @@ ReportTask::execute()
std::tr1::shared_ptr<const PackageIDSequence> installable(
(*e)[selection::BestVersionOnly((
(generator::InRepository(RepositoryName(*o)) &
- generator::Matches(make_package_dep_spec()
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package((*v)->name())
.version_requirement(make_named_values<VersionRequirement>(
value_for<n::version_operator>(vo_equal),
diff --git a/paludis/repositories/accounts/accounts_dep_key.cc b/paludis/repositories/accounts/accounts_dep_key.cc
index 913ec40..23cf2ec 100644
--- a/paludis/repositories/accounts/accounts_dep_key.cc
+++ b/paludis/repositories/accounts/accounts_dep_key.cc
@@ -51,7 +51,7 @@ namespace paludis
for (Set<std::string>::ConstIterator i(s->begin()), i_end(s->end()) ;
i != i_end ; ++i)
{
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec()
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package(CategoryNamePart("group") + PackageNamePart(*i))));
specs->push_back(spec);
tree->root()->append(spec);
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index 1ff62c6..e501d5a 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -443,7 +443,8 @@ AccountsRepository::package_set(const SetName & s) const
for (QualifiedPackageNameSet::ConstIterator e(pkgs->begin()), e_end(pkgs->end()) ;
e != e_end ; ++e)
{
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec().package(QualifiedPackageName(*e))));
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec(
+ PartiallyMadePackageDepSpecOptions()).package(QualifiedPackageName(*e))));
spec->set_tag(tag);
result->root()->append(spec);
}
diff --git a/paludis/repositories/cran/package_dep_spec.cc b/paludis/repositories/cran/package_dep_spec.cc
index 73f3733..fe8acb3 100644
--- a/paludis/repositories/cran/package_dep_spec.cc
+++ b/paludis/repositories/cran/package_dep_spec.cc
@@ -151,6 +151,11 @@ namespace
{
return make_null_shared_ptr();
}
+
+ virtual const PartiallyMadePackageDepSpecOptions options_for_partially_made_package_dep_spec() const
+ {
+ return PartiallyMadePackageDepSpecOptions();
+ }
};
}
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index cc6d385..75f479f 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -179,7 +179,8 @@ EInstalledRepository::package_set(const SetName & s) const
for (QualifiedPackageNameSet::ConstIterator e(pkgs->begin()), e_end(pkgs->end()) ;
e != e_end ; ++e)
{
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec().package(*e)));
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec(
+ PartiallyMadePackageDepSpecOptions()).package(*e)));
spec->set_tag(tag);
result->root()->append(spec);
}
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index feb143b..689fa67 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -311,7 +311,7 @@ ERepositorySets::security_set(bool insecurity) const
if (insecurity)
{
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
- make_package_dep_spec()
+ make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package((*c)->name())
.version_requirement(make_named_values<VersionRequirement>(
value_for<n::version_operator>(vo_equal),
@@ -344,7 +344,7 @@ ERepositorySets::security_set(bool insecurity) const
continue;
}
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec()
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package((*r)->name())
.version_requirement(make_named_values<VersionRequirement>(
value_for<n::version_operator>(vo_equal),
diff --git a/paludis/repositories/e/qa/visibility.cc b/paludis/repositories/e/qa/visibility.cc
index de52144..b14ffdb 100644
--- a/paludis/repositories/e/qa/visibility.cc
+++ b/paludis/repositories/e/qa/visibility.cc
@@ -119,7 +119,7 @@ namespace
ERepositoryProfile::VirtualsConstIterator v((*profile).profile()->fetch()->find_virtual(*p->package_ptr()));
if ((*profile).profile()->fetch()->end_virtuals() != v)
{
- PartiallyMadePackageDepSpec pp;
+ PartiallyMadePackageDepSpec pp((PartiallyMadePackageDepSpecOptions()));
if (v->second->version_requirements_ptr())
std::for_each(v->second->version_requirements_ptr()->begin(), v->second->version_requirements_ptr()->end(),
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 62ecec5..dc154ab 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -438,7 +438,8 @@ InstalledUnpackagedRepository::package_set(const SetName & s) const
for (QualifiedPackageNameSet::ConstIterator e(pkgs->begin()), e_end(pkgs->end()) ;
e != e_end ; ++e)
{
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec().package(QualifiedPackageName(*e))));
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()
+ ).package(QualifiedPackageName(*e))));
spec->set_tag(tag);
result->root()->append(spec);
}
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 58642b0..c731c8a 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -67,7 +67,7 @@ namespace paludis
labels(l),
spec(exact ?
make_shared_ptr(new PackageDepSpec(
- make_package_dep_spec()
+ make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package(v->name())
.version_requirement(make_named_values<VersionRequirement>(
value_for<n::version_operator>(vo_equal),
@@ -77,7 +77,7 @@ namespace paludis
.in_repository(v->repository()->name())))
:
make_shared_ptr(new PackageDepSpec(
- make_package_dep_spec()
+ make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package(v->name())
))
),
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 9dd6fca..9bbb64d 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 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
@@ -169,7 +169,7 @@ VirtualsRepository::need_names() const
for (RepositoryProvidesInterface::ProvidesSequence::ConstIterator p(provides->begin()),
p_end(provides->end()) ; p != p_end ; ++p)
_imp->names.push_back(std::make_pair((*p).virtual_name(), std::tr1::shared_ptr<const PackageDepSpec>(
- new PackageDepSpec(make_package_dep_spec().package((*p).provided_by()->name())))));
+ new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package((*p).provided_by()->name())))));
}
std::sort(_imp->names.begin(), _imp->names.end(), NamesSortComparator());
diff --git a/paludis/set_file.cc b/paludis/set_file.cc
index 8b1edf4..d00a292 100644
--- a/paludis/set_file.cc
+++ b/paludis/set_file.cc
@@ -270,7 +270,7 @@ namespace
Log::get_instance()->message("set_file.bad_operator", ll_warning, lc_context)
<< "Line '" << line << "' uses ?: operator but no environment is available";
else if (! (*params.environment())[selection::SomeArbitraryVersion(generator::Matches(
- make_package_dep_spec()
+ make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
.package(*spec->package_ptr())
.slot_requirement(spec->slot_requirement_ptr()),
MatchPackageOptions()) |
diff --git a/paludis/uninstall_task.cc b/paludis/uninstall_task.cc
index 2962d99..7105a92 100644
--- a/paludis/uninstall_task.cc
+++ b/paludis/uninstall_task.cc
@@ -315,7 +315,7 @@ UninstallTask::execute()
{
bool remove(true);
std::tr1::shared_ptr<const PackageIDSequence> installed((*_imp->env)[selection::AllVersionsUnsorted(
- generator::Matches(make_package_dep_spec().package(i->first), MatchPackageOptions()) |
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(i->first), MatchPackageOptions()) |
filter::SupportsAction<InstalledAction>()
)]);
for (PackageIDSequence::ConstIterator r(installed->begin()), r_end(installed->end()) ;
@@ -324,7 +324,8 @@ UninstallTask::execute()
remove = false;
if (remove)
- all->root()->append(make_shared_ptr(new PackageDepSpec(make_package_dep_spec().package(i->first))));
+ all->root()->append(make_shared_ptr(new PackageDepSpec(make_package_dep_spec(
+ PartiallyMadePackageDepSpecOptions()).package(i->first))));
}
world_remove_packages(all);
diff --git a/paludis/user_dep_spec.cc b/paludis/user_dep_spec.cc
index 5cc7a25..8d0bf66 100644
--- a/paludis/user_dep_spec.cc
+++ b/paludis/user_dep_spec.cc
@@ -278,6 +278,11 @@ namespace
result.from_repository(RepositoryName(left));
}
}
+
+ const PartiallyMadePackageDepSpecOptions fixed_options_for_partially_made_package_dep_spec(PartiallyMadePackageDepSpecOptions o)
+ {
+ return o;
+ }
}
PackageDepSpec
@@ -289,6 +294,8 @@ paludis::parse_user_package_dep_spec(const std::string & ss, const Environment *
Context context("When parsing user package dep spec '" + ss + "':");
bool had_bracket_version_requirements(false);
+ PartiallyMadePackageDepSpecOptions o;
+
return partial_parse_generic_elike_package_dep_spec(ss, make_named_values<GenericELikePackageDepSpecParseFunctions>(
value_for<n::add_package_requirement>(std::tr1::bind(&user_add_package_requirement, _1, _2, env, options, filter)),
value_for<n::add_version_requirement>(std::tr1::bind(&elike_add_version_requirement, _1, _2, _3)),
@@ -299,6 +306,7 @@ paludis::parse_user_package_dep_spec(const std::string & ss, const Environment *
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), ELikePackageDepSpecOptions())),
+ value_for<n::options_for_partially_made_package_dep_spec>(std::tr1::bind(&fixed_options_for_partially_made_package_dep_spec, o)),
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,
diff --git a/python/dep_spec.cc b/python/dep_spec.cc
index 401403d..9b6a9e7 100644
--- a/python/dep_spec.cc
+++ b/python/dep_spec.cc
@@ -271,7 +271,7 @@ PythonPackageDepSpec::~PythonPackageDepSpec()
PythonPackageDepSpec::operator PackageDepSpec() const
{
- PartiallyMadePackageDepSpec p;
+ PartiallyMadePackageDepSpec p((PartiallyMadePackageDepSpecOptions()));
if (package_ptr())
p.package(*package_ptr());
diff --git a/src/clients/adjutrix/downgrade_check.cc b/src/clients/adjutrix/downgrade_check.cc
index b8f668d..cee22c5 100644
--- a/src/clients/adjutrix/downgrade_check.cc
+++ b/src/clients/adjutrix/downgrade_check.cc
@@ -146,7 +146,7 @@ namespace
a(after.find(b->first));
if (after.end() == a)
{
- PartiallyMadePackageDepSpec part_spec;
+ PartiallyMadePackageDepSpec part_spec((PartiallyMadePackageDepSpecOptions()));
part_spec.package(b->first.first);
if ("(none)" != b->first.second)
part_spec.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(SlotName(b->first.second))));
diff --git a/src/clients/adjutrix/keywords_graph.cc b/src/clients/adjutrix/keywords_graph.cc
index 7a5ed90..8d99a7e 100644
--- a/src/clients/adjutrix/keywords_graph.cc
+++ b/src/clients/adjutrix/keywords_graph.cc
@@ -84,7 +84,7 @@ namespace
FindUnusedPackagesTask task(&e, &repo);
std::tr1::shared_ptr<const PackageIDSequence> packages(e[selection::AllVersionsGroupedBySlot(
generator::InRepository(repo.name()) &
- generator::Matches(make_package_dep_spec().package(package), MatchPackageOptions()))]);
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(package), MatchPackageOptions()))]);
std::tr1::shared_ptr<const PackageIDSequence> unused(task.execute(package));
if (packages->empty())
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index 6e7d3fb..8533bbf 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -175,7 +175,7 @@ namespace
for (PackageIDSequence::ConstIterator i(names->begin()), i_end(names->end()) ;
i != i_end ; ++i)
{
- PackageDepSpec name_spec(make_package_dep_spec().package((*i)->name()));
+ PackageDepSpec name_spec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package((*i)->name()));
cout << format_general_s(select_format_for_spec(env, name_spec,
f::show_wildcard_spec_installed(),
f::show_wildcard_spec_installable(),
diff --git a/src/clients/inquisitio/do_search.cc b/src/clients/inquisitio/do_search.cc
index 64c5a40..f9bc679 100644
--- a/src/clients/inquisitio/do_search.cc
+++ b/src/clients/inquisitio/do_search.cc
@@ -308,7 +308,7 @@ do_search(const Environment & env)
i(ids.begin()), i_end(ids.end()) ; i != i_end ; ++i)
if (i->second)
{
- task.show(make_package_dep_spec().package(i->first), i->second);
+ task.show(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package(i->first), i->second);
any = true;
}
diff --git a/src/clients/reconcilio/fix_linkage.cc b/src/clients/reconcilio/fix_linkage.cc
index e46eb7c..38cb413 100644
--- a/src/clients/reconcilio/fix_linkage.cc
+++ b/src/clients/reconcilio/fix_linkage.cc
@@ -98,7 +98,7 @@ do_fix_linkage(const std::tr1::shared_ptr<Environment> & env)
std::cout << std::endl;
}
- PartiallyMadePackageDepSpec part_spec;
+ PartiallyMadePackageDepSpec part_spec((PartiallyMadePackageDepSpecOptions()));
part_spec.package((*pkg_it)->name());
if ((*pkg_it)->slot_key())
part_spec.slot_requirement(make_shared_ptr(new UserSlotExactRequirement((*pkg_it)->slot_key()->value())));
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 4e339e9..9e312d7 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -396,13 +396,17 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
repo.reset(new RepositoryName(d.destination()->name()));
std::tr1::shared_ptr<const PackageIDSequence> existing_repo((*environment())[selection::AllVersionsSorted(repo ?
- generator::Matches(make_package_dep_spec().package(d.package_id()->name()).in_repository(*repo), MatchPackageOptions()) :
- generator::Matches(make_package_dep_spec().package(d.package_id()->name()), MatchPackageOptions()) | filter::SupportsAction<InstalledAction>()
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
+ .package(d.package_id()->name()).in_repository(*repo), MatchPackageOptions()) :
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
+ .package(d.package_id()->name()), MatchPackageOptions()) | filter::SupportsAction<InstalledAction>()
)]);;
std::tr1::shared_ptr<const PackageIDSequence> existing_slot_repo((*environment())[selection::AllVersionsSorted((repo ?
- generator::Matches(make_package_dep_spec().package(d.package_id()->name()).in_repository(*repo), MatchPackageOptions()) :
- generator::Matches(make_package_dep_spec().package(d.package_id()->name()), MatchPackageOptions()) | filter::SupportsAction<InstalledAction>())
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
+ .package(d.package_id()->name()).in_repository(*repo), MatchPackageOptions()) :
+ generator::Matches(make_package_dep_spec(PartiallyMadePackageDepSpecOptions())
+ .package(d.package_id()->name()), MatchPackageOptions()) | filter::SupportsAction<InstalledAction>())
| filter::SameSlot(d.package_id()))]);
display_merge_list_entry_start(d, m);