aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-21 16:25:04 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-21 19:57:04 +0100
commit270fc45d005bc91f2bb3fb352f60f8900dc2383c (patch)
treefaf33f5b7660f3f3d40580550aafb28d28bbf8e6
parent44624c23aa070481b3abeb2dc2220cac50e6c2b0 (diff)
downloadpaludis-270fc45d005bc91f2bb3fb352f60f8900dc2383c.tar.gz
paludis-270fc45d005bc91f2bb3fb352f60f8900dc2383c.tar.xz
CRANRepository -> Process
-rw-r--r--paludis/repositories/cran/cran_repository.cc34
1 files changed, 19 insertions, 15 deletions
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index d73074b..776f2e1 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -47,6 +47,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/extract_host_from_url.hh>
#include <paludis/util/make_null_shared_ptr.hh>
+#include <paludis/util/process.hh>
#include <paludis/output_manager.hh>
#include <paludis/syncer.hh>
#include <paludis/hook.hh>
@@ -349,41 +350,44 @@ CRANRepository::sync(const std::shared_ptr<OutputManager> & output_manager) cons
std::string cmd("rsync --delete --recursive --progress --exclude \"*.html\" --exclude \"*.INDEX\" '" +
_imp->params.sync() + "/src/contrib/Descriptions/' ./");
- Command command1(Command(cmd).with_chdir(_imp->params.location()));
+ Process command1((ProcessCommand(cmd)));
+ command1.chdir(_imp->params.location());
command1
- .with_captured_stdout_stream(&output_manager->stdout_stream())
- .with_captured_stderr_stream(&output_manager->stderr_stream())
- .with_ptys()
+ .capture_stdout(output_manager->stdout_stream())
+ .capture_stderr(output_manager->stderr_stream())
+ .use_ptys()
;
- if (0 != run_command(command1))
+ if (0 != command1.run().wait())
throw SyncFailedError(stringify(_imp->params.location()), _imp->params.sync());
cmd = "rsync --progress '" + _imp->params.sync() + "/src/contrib/PACKAGES' ./";
- Command command2(Command(cmd).with_chdir(_imp->params.location()));
+ Process command2((ProcessCommand(cmd)));
+ command2.chdir(_imp->params.location());
command2
- .with_captured_stdout_stream(&output_manager->stdout_stream())
- .with_captured_stderr_stream(&output_manager->stderr_stream())
- .with_ptys()
+ .capture_stdout(output_manager->stdout_stream())
+ .capture_stderr(output_manager->stderr_stream())
+ .use_ptys()
;
- if (0 != run_command(command2))
+ if (0 != command2.run().wait())
throw SyncFailedError(stringify(_imp->params.location()), _imp->params.sync());
cmd = "rsync --progress '" + _imp->params.sync() + "/CRAN_mirrors.csv' ./";
- Command command3(Command(cmd).with_chdir(_imp->params.location()));
+ Process command3((ProcessCommand(cmd)));
+ command3.chdir(_imp->params.location());
command3
- .with_captured_stdout_stream(&output_manager->stdout_stream())
- .with_captured_stderr_stream(&output_manager->stderr_stream())
- .with_ptys()
+ .capture_stdout(output_manager->stdout_stream())
+ .capture_stderr(output_manager->stderr_stream())
+ .use_ptys()
;
- if (0 != run_command(command3))
+ if (0 != command3.run().wait())
throw SyncFailedError(stringify(_imp->params.location()), _imp->params.sync());
return true;