aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-13 16:51:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-13 16:51:40 +0000
commiteba50cbc029f37141d115083966acae94b8cae77 (patch)
tree841105f05eba4578c7785ce9be8bda214c30095c
parent2d61d63874ad7009f1f9075c26024f1875cd85e0 (diff)
downloadpaludis-eba50cbc029f37141d115083966acae94b8cae77.tar.gz
paludis-eba50cbc029f37141d115083966acae94b8cae77.tar.xz
Don't create output manager for pretend if we're not going to use it
-rw-r--r--paludis/repositories/e/ebuild_entries.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 3d7b0b3..dc41052 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -996,8 +996,6 @@ EbuildEntries::pretend(
if (! id->eapi()->supported())
return false;
- std::tr1::shared_ptr<OutputManager> output_manager(a.options.make_output_manager()(a));
-
bool result(true);
if (! id->raw_myoptions_key())
@@ -1025,6 +1023,8 @@ EbuildEntries::pretend(
std::tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
+ std::tr1::shared_ptr<OutputManager> output_manager;
+
if (id->raw_myoptions_key())
{
MyOptionsRequirementsVerifier verifier(id);
@@ -1039,6 +1039,9 @@ EbuildEntries::pretend(
for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
{
+ if (! output_manager)
+ output_manager = a.options.make_output_manager()(a);
+
EbuildCommandParams command_params(make_named_values<EbuildCommandParams>(
value_for<n::builddir>(_imp->params.builddir()),
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
@@ -1087,6 +1090,9 @@ EbuildEntries::pretend(
if (can_skip_phase(id, *phase))
continue;
+ if (! output_manager)
+ output_manager = a.options.make_output_manager()(a);
+
EbuildCommandParams command_params(make_named_values<EbuildCommandParams>(
value_for<n::builddir>(_imp->params.builddir()),
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),