aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-27 14:35:09 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-27 14:35:09 +0000
commitf2d976c54f21cee71d890a011317f521221ec2a9 (patch)
treea0e9210c6f4f5b6497fddcdbca045701ae703508
parent4edbd1da2873204b78920722f08bfe6b73641cfb (diff)
downloadpaludis-f2d976c54f21cee71d890a011317f521221ec2a9.tar.gz
paludis-f2d976c54f21cee71d890a011317f521221ec2a9.tar.xz
Handle failures better
-rw-r--r--src/clients/cave/cmd_sync.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_sync.cc b/src/clients/cave/cmd_sync.cc
index 47b991b..e71b7cf 100644
--- a/src/clients/cave/cmd_sync.cc
+++ b/src/clients/cave/cmd_sync.cc
@@ -177,6 +177,10 @@ namespace
}
catch (...)
{
+ {
+ Lock lock(mutex);
+ finished = true;
+ }
notifier_condition.acquire_then_signal(notifier_mutex);
throw;
}
@@ -239,6 +243,13 @@ namespace
)));
cout << format_general_spad(f::sync_repo_done_failure(), stringify(r), np, na, nd);
+ std::tr1::shared_ptr<const Sequence<std::string> > tail(output_deviant->tail(true));
+ if (tail && tail->begin() != tail->end())
+ {
+ for (Sequence<std::string>::ConstIterator t(tail->begin()), t_end(tail->end()) ;
+ t != t_end ; ++t)
+ cout << format_general_s(f::sync_repo_tail(), *t);
+ }
int PALUDIS_ATTRIBUTE((unused)) ignore(env->perform_hook(Hook("sync_fail")
("TARGET", stringify(r))