aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-19 18:39:08 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-21 19:57:03 +0100
commit1857fdf1898ae0d3850cb134b421fc33533e21de (patch)
tree7d7473be4971c2352d22a1f8a1f88152d3d99dd9
parentab453fb7ba771af672fd3ed595a288e59be2428d (diff)
downloadpaludis-1857fdf1898ae0d3850cb134b421fc33533e21de.tar.gz
paludis-1857fdf1898ae0d3850cb134b421fc33533e21de.tar.xz
Various E things -> Process
-rw-r--r--paludis/repositories/e/e_installed_repository.cc8
-rw-r--r--paludis/repositories/e/e_repository.cc5
2 files changed, 8 insertions, 5 deletions
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 81915e9..97aaeb9 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -37,6 +37,7 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/safe_ifstream.hh>
+#include <paludis/util/process.hh>
#include <paludis/action.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
@@ -203,9 +204,10 @@ EInstalledRepository::get_environment_variable(
else if ((ver_dir / "environment.bz2").is_regular_file_or_symlink_to_regular_file())
{
std::stringstream p;
- Command cmd(Command("bash -c '( bunzip2 < " + stringify(ver_dir / "environment.bz2" ) +
- " ; echo echo \\$" + var + " ) | bash -O extglob 2>/dev/null'").with_captured_stdout_stream(&p));
- int exit_status(run_command(cmd));
+ Process env_process(ProcessCommand({"bash", "-c", "'( bunzip2 < " + stringify(ver_dir / "environment.bz2" ) +
+ " ; echo echo \\$" + var + " ) | bash -O extglob 2>/dev/null'"}));
+ env_process.capture_stdout(p);
+ int exit_status(env_process.run().wait());
std::string result(strip_trailing_string(std::string(
(std::istreambuf_iterator<char>(p)),
std::istreambuf_iterator<char>()), "\n"));
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 30e52fe..b1e9a57 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -84,6 +84,7 @@
#include <paludis/util/mutex.hh>
#include <paludis/util/options.hh>
#include <paludis/util/pimp-impl.hh>
+#include <paludis/util/process.hh>
#include <paludis/util/random.hh>
#include <paludis/util/rmd160.hh>
#include <paludis/util/safe_ifstream.hh>
@@ -2793,8 +2794,8 @@ ERepository::merge(const MergeParams & m)
merger.merge();
- Command compress_cmd("bzip2 " + stringify(_imp->params.binary_distdir() / (bin_dist_base + ".tar")));
- if (0 != run_command(compress_cmd))
+ Process compress_process(ProcessCommand({"bzip2", stringify(_imp->params.binary_distdir() / (bin_dist_base + ".tar")) }));
+ if (0 != compress_process.run().wait())
throw ActionFailedError("Compressing tarball failed");
FSEntry binary_ebuild_location(layout()->binary_ebuild_location(