aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-11-02 12:30:20 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-11-02 12:30:20 +0000
commitab8e41cfca849f62ac6bf065201764ba4b8f8009 (patch)
tree840afdea6e02f7e9f0d07b2ef5e3cf3f551ebbdc
parent257cefbcd37fa70a43c92df28fb16bb1fc39547b (diff)
downloadpaludis-ab8e41cfca849f62ac6bf065201764ba4b8f8009.tar.gz
paludis-ab8e41cfca849f62ac6bf065201764ba4b8f8009.tar.xz
Set PALUDIS_COMMAND
-rw-r--r--src/clients/cave/Makefile.am1
-rw-r--r--src/clients/cave/cave.cc5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/clients/cave/Makefile.am b/src/clients/cave/Makefile.am
index d0ae27f..30f69a6 100644
--- a/src/clients/cave/Makefile.am
+++ b/src/clients/cave/Makefile.am
@@ -1,6 +1,7 @@
AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src \
@PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_NO_WOLD_STYLE_CAST@ @PALUDIS_CXXFLAGS_VISIBILITY@
DEFS= \
+ -DBINDIR=\"$(bindir)\" \
-DSYSCONFDIR=\"$(sysconfdir)\" \
-DDATADIR=\"$(datadir)\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
diff --git a/src/clients/cave/cave.cc b/src/clients/cave/cave.cc
index f863bae..090857e 100644
--- a/src/clients/cave/cave.cc
+++ b/src/clients/cave/cave.cc
@@ -23,6 +23,7 @@
#include <paludis/util/iterator_funcs.hh>
#include <paludis/args/do_help.hh>
#include <paludis/environment_factory.hh>
+#include <paludis/environment.hh>
#include <iostream>
#include <cstdlib>
#include <string>
@@ -51,6 +52,10 @@ int main(int argc, char * argv[])
Log::get_instance()->set_log_level(cmdline.a_log_level.option());
std::tr1::shared_ptr<Environment> env(EnvironmentFactory::get_instance()->create(cmdline.a_environment.argument()));
+ env->set_paludis_command(std::string(BINDIR"/paludis")
+ + " --" + cmdline.a_log_level.long_name() + " " + cmdline.a_log_level.argument()
+ + " --" + cmdline.a_environment.long_name() + " " + (cmdline.a_environment.argument().empty() ? ":" : cmdline.a_environment.argument()));
+
std::tr1::shared_ptr<Sequence<std::string> > seq(new Sequence<std::string>);
std::copy(next(cmdline.begin_parameters()), cmdline.end_parameters(), seq->back_inserter());