aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-15 14:13:39 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-15 14:13:39 +0000
commit169e91b611f2a12b89467e03abb4c76ddbe3fe7e (patch)
tree2663836792a36cb4b8c05305b3edbdb247edd07b /src
parent7e125b4740d8bb50aa06b97d1dc070dfbce8bb3a (diff)
downloadpaludis-169e91b611f2a12b89467e03abb4c76ddbe3fe7e.tar.gz
paludis-169e91b611f2a12b89467e03abb4c76ddbe3fe7e.tar.xz
Replace PackageDepSpec::use_requirements with a more general PackageDepSpec::additional_requirements.
Diffstat (limited to 'src')
-rw-r--r--src/output/console_install_task.cc13
-rw-r--r--src/output/console_install_task.hh2
-rw-r--r--src/output/console_query_task.cc4
3 files changed, 14 insertions, 5 deletions
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index f922faf06..52318351b 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -1595,12 +1595,21 @@ ConsoleInstallTask::on_all_masked_error(const AllMaskedError & e)
}
void
-ConsoleInstallTask::on_use_requirements_not_met_error(const UseRequirementsNotMetError & e)
+ConsoleInstallTask::on_additional_requirements_not_met_error(const AdditionalRequirementsNotMetError & e)
{
output_stream() << endl;
- output_stream() << "DepList USE requirements not met error:" << endl;
+ output_stream() << "DepList additional requirements not met error:" << endl;
output_stream() << " * " << e.backtrace("\n * ") << e.message() << endl;
output_stream() << endl;
+ if (e.query().additional_requirements_ptr())
+ {
+ output_stream() << "Additional requirements are as follows:" << endl;
+ for (AdditionalPackageDepSpecRequirements::ConstIterator i(e.query().additional_requirements_ptr()->begin()),
+ i_end(e.query().additional_requirements_ptr()->end()) ;
+ i != i_end ; ++i)
+ output_stream() << " * " << (*i)->as_human_string() << endl;
+ output_stream() << endl;
+ }
output_stream() << "This error usually indicates that one of the packages you are trying to" << endl;
output_stream() << "install requires that another package be built with particular USE flags" << endl;
output_stream() << "enabled or disabled. You may be able to work around this restriction by" << endl;
diff --git a/src/output/console_install_task.hh b/src/output/console_install_task.hh
index 538c6bfda..46a24f136 100644
--- a/src/output/console_install_task.hh
+++ b/src/output/console_install_task.hh
@@ -188,7 +188,7 @@ namespace paludis
virtual void on_ambiguous_package_name_error(const AmbiguousPackageNameError &);
virtual void on_no_such_package_error(const NoSuchPackageError &);
virtual void on_all_masked_error(const AllMaskedError &);
- virtual void on_use_requirements_not_met_error(const UseRequirementsNotMetError &);
+ virtual void on_additional_requirements_not_met_error(const AdditionalRequirementsNotMetError &);
virtual void on_dep_list_error(const DepListError &);
virtual void on_had_both_package_and_set_targets_error(const HadBothPackageAndSetTargets &);
virtual void on_multiple_set_targets_specified(const MultipleSetTargetsSpecified &);
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index cb1cf5366..688e16d54 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -107,7 +107,7 @@ ConsoleQueryTask::show(const PackageDepSpec & a, tr1::shared_ptr<const PackageID
void
ConsoleQueryTask::display_header(const PackageDepSpec & a, const tr1::shared_ptr<const PackageID> & e) const
{
- if (a.version_requirements_ptr() || a.slot_ptr() || a.use_requirements_ptr() ||
+ if (a.version_requirements_ptr() || a.slot_ptr() || a.additional_requirements_ptr() ||
a.repository_ptr())
output_starred_item(render_as_package_name(stringify(a)));
else
@@ -117,7 +117,7 @@ ConsoleQueryTask::display_header(const PackageDepSpec & a, const tr1::shared_ptr
void
ConsoleQueryTask::display_compact(const PackageDepSpec & a, const tr1::shared_ptr<const PackageID> & e) const
{
- if (a.version_requirements_ptr() || a.slot_ptr() || a.use_requirements_ptr() ||
+ if (a.version_requirements_ptr() || a.slot_ptr() || a.additional_requirements_ptr() ||
a.repository_ptr())
{
std::string pad(std::max<long>(1, 30 - stringify(a).length()), ' ');