diff options
56 files changed, 832 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index becd1fe0f..1634898d5 100644 --- a/configure.ac +++ b/configure.ac @@ -1523,6 +1523,7 @@ AC_OUTPUT( paludis/environments/Makefile paludis/environments/no_config/Makefile paludis/environments/paludis/Makefile + paludis/environments/paludis/output_managers/Makefile paludis/environments/portage/Makefile paludis/environments/test/Makefile paludis/fetchers/Makefile diff --git a/hooks/Makefile.am.m4 b/hooks/Makefile.am.m4 index e008f77d6..f992cffd4 100644 --- a/hooks/Makefile.am.m4 +++ b/hooks/Makefile.am.m4 @@ -301,6 +301,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_SKIP_CONFIG="yes" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ PALUDIS_ENVIRONMENT_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TOP_SRCDIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_srcdir)`" \ TOP_BUILDDIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)`" \ bash $(top_srcdir)/hooks/run_test.bash diff --git a/paludis/Makefile.am.m4 b/paludis/Makefile.am.m4 index 57ec9666d..6df5ee37b 100644 --- a/paludis/Makefile.am.m4 +++ b/paludis/Makefile.am.m4 @@ -200,6 +200,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_PC_SLOT=@PALUDIS_PC_SLOT@ \ PYTHONPATH="$(top_builddir)/python/" \ PALUDIS_PYTHON_DIR="$(top_srcdir)/python/" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ LD_LIBRARY_PATH="`echo $$LD_LIBRARY_PATH: | sed -e 's,^:,,'`` \ $(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/.libs/ \ `:`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/.libs/ \ diff --git a/paludis/create_output_manager_info.se b/paludis/create_output_manager_info.se index 2549abbde..7a51cde97 100644 --- a/paludis/create_output_manager_info.se +++ b/paludis/create_output_manager_info.se @@ -9,6 +9,8 @@ make_enum_OutputExclusivity() key oe_with_others "Other things may be running at the same time" key oe_exclusive "We are the only thing running" + want_destringify + doxygen_comment << "END" /** * Options telling most CreateOutputManagerInfo subclasses whether we diff --git a/paludis/distributions/exherbo/paludis.conf b/paludis/distributions/exherbo/paludis.conf index cd018589d..be3b0431c 100644 --- a/paludis/distributions/exherbo/paludis.conf +++ b/paludis/distributions/exherbo/paludis.conf @@ -3,6 +3,8 @@ keywords_filename_part = platforms licenses_filename_part = licences mandatory_userpriv = true mirrors_filename_part = mirrors +output_filename_part = output +output_managers_directory = output_managers package_mask_filename_part = package_mask package_unmask_filename_part = package_unmask repositories_directory = repositories diff --git a/paludis/distributions/gentoo/paludis.conf b/paludis/distributions/gentoo/paludis.conf index 1c5b97e2d..0c270f4a7 100644 --- a/paludis/distributions/gentoo/paludis.conf +++ b/paludis/distributions/gentoo/paludis.conf @@ -3,6 +3,8 @@ keywords_filename_part = keywords licenses_filename_part = licenses mandatory_userpriv = false mirrors_filename_part = mirrors +output_filename_part = output +output_managers_directory = output_managers package_mask_filename_part = package_mask package_unmask_filename_part = package_unmask repositories_directory = repositories diff --git a/paludis/environments/paludis/Makefile.am b/paludis/environments/paludis/Makefile.am index bbebe206f..31f16a83f 100644 --- a/paludis/environments/paludis/Makefile.am +++ b/paludis/environments/paludis/Makefile.am @@ -1,3 +1,4 @@ +SUBDIRS = output_managers . CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda *.loT *.epicfail BUILT_SOURCES = $(DISTCLEANFILES) MAINTAINERCLEANFILES = Makefile.in @@ -6,7 +7,8 @@ DEFS= \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ -DDATADIR=\"$(datadir)\" \ - -DLIBDIR=\"$(libdir)\" + -DLIBDIR=\"$(libdir)\" \ + -DSHAREDIR=\"$(sharedir)\" libpaludispaludisenvironment_@PALUDIS_PC_SLOT@_la_SOURCES = \ bashable_conf.cc bashable_conf.hh \ @@ -15,6 +17,8 @@ libpaludispaludisenvironment_@PALUDIS_PC_SLOT@_la_SOURCES = \ package_mask_conf.cc package_mask_conf.hh \ use_conf.cc use_conf.hh \ mirrors_conf.cc mirrors_conf.hh \ + output_conf.cc output_conf.hh \ + output_managers.cc output_managers.hh \ world.cc world.hh \ paludis_config.cc paludis_config.hh \ paludis_environment.cc paludis_environment.hh \ @@ -23,6 +27,11 @@ libpaludispaludisenvironment_@PALUDIS_PC_SLOT@_la_SOURCES = \ libpaludispaludisenvironment_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0 +shareenvpaludisdir = $(sharedir)/paludis/environments/paludis/ + +dist_shareenvpaludis_DATA = \ + default_output.conf + if ! MONOLITHIC libpaludispaludisenvironment_@PALUDIS_PC_SLOT@_la_LIBADD = \ @@ -81,6 +90,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ PALUDIS_NO_CHOWN="yes" \ PALUDIS_TESTS_KEEP_STDERR="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ LD_LIBRARY_PATH="`echo $$LD_LIBRARY_PATH: | sed -e 's,^:,,'`` \ $(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/`:` \ $(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/.libs/`" \ diff --git a/paludis/environments/paludis/bashable_conf.cc b/paludis/environments/paludis/bashable_conf.cc index 69bf7747e..f1f654775 100644 --- a/paludis/environments/paludis/bashable_conf.cc +++ b/paludis/environments/paludis/bashable_conf.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -59,3 +59,36 @@ paludis::paludis_environment::make_bashable_conf(const FSEntry & f) return result; } +std::tr1::shared_ptr<KeyValueConfigFile> +paludis::paludis_environment::make_bashable_kv_conf(const FSEntry & f) +{ + Context context("When making a key=value config file out of '" + stringify(f) + "':"); + + std::tr1::shared_ptr<KeyValueConfigFile> result; + + if (is_file_with_extension(f, ".bash", IsFileWithOptions())) + { + std::stringstream s; + Command cmd(Command("bash '" + stringify(f) + "'") + .with_setenv("PALUDIS_LOG_LEVEL", stringify(Log::get_instance()->log_level())) + .with_setenv("PALUDIS_EBUILD_DIR", getenv_with_default("PALUDIS_EBUILD_DIR", LIBEXECDIR "/paludis")) + .with_stderr_prefix(f.basename() + "> ") + .with_captured_stdout_stream(&s)); + int exit_status(run_command(cmd)); + result.reset(new KeyValueConfigFile(s, KeyValueConfigFileOptions(), &KeyValueConfigFile::no_defaults, + &KeyValueConfigFile::no_transformation)); + + if (exit_status != 0) + { + Log::get_instance()->message("paludis_environment.bash_conf.failure", ll_warning, lc_context) + << "Script '" << f <<"' returned non-zero exit status '" << exit_status << "'"; + result.reset(); + } + } + else + result.reset(new KeyValueConfigFile(f, KeyValueConfigFileOptions(), &KeyValueConfigFile::no_defaults, + &KeyValueConfigFile::no_transformation)); + + return result; +} + diff --git a/paludis/environments/paludis/bashable_conf.hh b/paludis/environments/paludis/bashable_conf.hh index f3819a85c..6a6ede128 100644 --- a/paludis/environments/paludis/bashable_conf.hh +++ b/paludis/environments/paludis/bashable_conf.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -29,6 +29,7 @@ namespace paludis namespace paludis_environment { std::tr1::shared_ptr<LineConfigFile> make_bashable_conf(const FSEntry &); + std::tr1::shared_ptr<KeyValueConfigFile> make_bashable_kv_conf(const FSEntry &); } } diff --git a/paludis/environments/paludis/default_output.conf b/paludis/environments/paludis/default_output.conf new file mode 100644 index 000000000..8f4e2800b --- /dev/null +++ b/paludis/environments/paludis/default_output.conf @@ -0,0 +1 @@ +type = * : standard diff --git a/paludis/environments/paludis/extra_distribution_data.cc b/paludis/environments/paludis/extra_distribution_data.cc index 68d1d0735..0893c630f 100644 --- a/paludis/environments/paludis/extra_distribution_data.cc +++ b/paludis/environments/paludis/extra_distribution_data.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008 Ciaran McCreesh + * Copyright (c) 2008, 2009 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -44,6 +44,8 @@ namespace paludis value_for<n::licenses_filename_part>(k->get("licenses_filename_part")), value_for<n::mandatory_userpriv>(destringify<bool>(k->get("mandatory_userpriv"))), value_for<n::mirrors_filename_part>(k->get("mirrors_filename_part")), + value_for<n::output_filename_part>(k->get("output_filename_part")), + value_for<n::output_managers_directory>(k->get("output_managers_directory")), value_for<n::package_mask_filename_part>(k->get("package_mask_filename_part")), value_for<n::package_unmask_filename_part>(k->get("package_unmask_filename_part")), value_for<n::repositories_directory>(k->get("repositories_directory")), diff --git a/paludis/environments/paludis/extra_distribution_data.hh b/paludis/environments/paludis/extra_distribution_data.hh index 963fa6f8e..0496e5d11 100644 --- a/paludis/environments/paludis/extra_distribution_data.hh +++ b/paludis/environments/paludis/extra_distribution_data.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008 Ciaran McCreesh + * Copyright (c) 2008, 2009 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -33,6 +33,8 @@ namespace paludis struct licenses_filename_part; struct mandatory_userpriv; struct mirrors_filename_part; + struct output_filename_part; + struct output_managers_directory; struct package_mask_filename_part; struct package_unmask_filename_part; struct repositories_directory; @@ -49,6 +51,8 @@ namespace paludis NamedValue<n::licenses_filename_part, std::string> licenses_filename_part; NamedValue<n::mandatory_userpriv, bool> mandatory_userpriv; NamedValue<n::mirrors_filename_part, std::string> mirrors_filename_part; + NamedValue<n::output_filename_part, std::string> output_filename_part; + NamedValue<n::output_managers_directory, std::string> output_managers_directory; NamedValue<n::package_mask_filename_part, std::string> package_mask_filename_part; NamedValue<n::package_unmask_filename_part, std::string> package_unmask_filename_part; NamedValue<n::repositories_directory, std::string> repositories_directory; diff --git a/paludis/environments/paludis/output_conf.cc b/paludis/environments/paludis/output_conf.cc new file mode 100644 index 000000000..b62b85b10 --- /dev/null +++ b/paludis/environments/paludis/output_conf.cc @@ -0,0 +1,314 @@ +/* vim: set sw=4 sts=4 et foldmethod=syntax : */ + +/* + * Copyright (c) 2009 Ciaran McCreesh + * + * This file is part of the Paludis package manager. Paludis is free software; + * you can redistribute it and/or modify it under the terms of the GNU General + * Public License version 2, as published by the Free Software Foundation. + * + * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <paludis/environments/paludis/output_conf.hh> +#include <paludis/environments/paludis/bashable_conf.hh> +#include <paludis/environments/paludis/paludis_config.hh> +#include <paludis/environments/paludis/paludis_environment.hh> +#include <paludis/util/log.hh> +#include <paludis/util/private_implementation_pattern-impl.hh> +#include <paludis/util/tokeniser.hh> +#include <paludis/util/named_value.hh> +#include <paludis/util/make_named_values.hh> +#include <paludis/util/config_file.hh> +#include <paludis/util/wrapped_forward_iterator.hh> +#include <paludis/util/destringify.hh> +#include <paludis/util/options.hh> +#include <paludis/util/make_shared_copy.hh> +#include <paludis/user_dep_spec.hh> +#include <paludis/create_output_manager_info.hh> +#include <paludis/package_id.hh> +#include <paludis/match_package.hh> +#include <paludis/action.hh> +#include <list> +#include <vector> + +using namespace paludis; +using namespace paludis::paludis_environment; + +namespace paludis +{ + namespace n + { + struct action_requirement; + struct manager; + struct matches_requirement; + struct name_requirement; + struct output_exclusivity_requirement; + struct type_requirement; + } +} + +namespace +{ + struct Rule + { + NamedValue<n::action_requirement, std::string> action_requirement; + NamedValue<n::manager, std::string> manager; + NamedValue<n::matches_requirement, std::tr1::shared_ptr<PackageDepSpec> > matches_requirement; + NamedValue<n::name_requirement, std::string> name_requirement; + NamedValue<n::output_exclusivity_requirement, OutputExclusivity> output_exclusivity_requirement; + NamedValue<n::type_requirement, std::string> type_requirement; + }; + + typedef std::list<Rule> RuleList; +} + +namespace paludis +{ + template<> + struct Implementation<OutputConf> + { + const PaludisEnvironment * const env; + RuleList rules; + + Implementation(const PaludisEnvironment * const e) : + env(e) + { + } + }; +} + +OutputConf::OutputConf(const PaludisEnvironment * const e) : + PrivateImplementationPattern<OutputConf>(new Implementation<OutputConf>(e)) +{ +} + +OutputConf::~OutputConf() +{ +} + +namespace +{ + void set_rule(const Environment * const env, Rule & rule, const std::string & k, const std::string & v) + { + if (k == "type") + rule.type_requirement() = v; + else if (k == "name") + rule.name_requirement() = v; + else if (k == "output_exclusivity") + rule.output_exclusivity_requirement() = destringify<OutputExclusivity>(v); + else if (k == "matches") + rule.matches_requirement() = make_shared_copy(parse_user_package_dep_spec( + v, env, UserPackageDepSpecOptions() + updso_allow_wildcards + updso_no_disambiguation)); + else if (k == "action") + rule.action_requirement() = v; + else + throw PaludisConfigError("Unknown rule '" + k + "'"); + } + + struct ActionToString + { + std::string visit(const InstallAction &) const + { + return "install"; + } + + std::string visit(const PretendFetchAction &) const + { + return "pretend-fetch"; + } + + std::string visit(const UninstallAction &) const + { + return "uninstall"; + } + + std::string visit(const FetchAction &) const + { + return "fetch"; + } + + std::string visit(const PretendAction &) const + { + return "pretend"; + } + + std::string visit(const InfoAction &) const + { + return "info"; + } + + std::string visit(const ConfigAction &) const + { + return "config"; + } + + std::string visit(const InstalledAction &) const + { + return "installed"; + } + }; + + std::string action_to_string(const Action & a) + { + ActionToString v; + return a.accept_returning<std::string>(v); + } + + struct MatchRuleVisitor + { + const Environment * const env; + const Rule & rule; + + MatchRuleVisitor(const Environment * const e, const Rule & r) : + env(e), + rule(r) + { + } + + bool visit(const CreateOutputManagerForRepositorySyncInfo & i) const + { + if (rule.type_requirement() != "*" && rule.type_requirement() != "repository") + return false; + + if (rule.name_requirement() != "*" && rule.name_requirement() != stringify(i.repository().name())) + return false; + + if (rule.action_requirement() != "*" && rule.action_requirement() != "sync") + return false; + + if (-1 != rule.output_exclusivity_requirement() && + rule.output_exclusivity_requirement() != i.output_exclusivity()) + return false; + + return true; + } + + bool visit(const CreateOutputManagerForPackageIDActionInfo & i) const + { + if (rule.type_requirement() != "*" && rule.type_requirement() != "package") + return false; + + if (rule.name_requirement() != "*" && rule.name_requirement() != stringify(i.package_id()->name())) + return false; + + if (rule.action_requirement() != "*" && rule.action_requirement() != action_to_string(i.action())) + return false; + + if (-1 != rule.output_exclusivity_requirement() && + rule.output_exclusivity_requirement() != i.output_exclusivity()) + return false; + + if (rule.matches_requirement() && ! match_package(*env, *rule.matches_requirement(), + *i.package_id(), MatchPackageOptions())) + return false; + + return true; + } + }; + + bool match_rule(const Environment * const e, const Rule & rule, const CreateOutputManagerInfo & i) + { + MatchRuleVisitor v(e, rule); + return i.accept_returning<bool>(v); + } +} + +void +OutputConf::add(const FSEntry & filename) +{ + Context context("When adding source '" + stringify(filename) + "' as an output file:"); + + std::tr1::shared_ptr<LineConfigFile> f(make_bashable_conf(filename)); + if (! f) + return; + + for (LineConfigFile::ConstIterator line(f->begin()), line_end(f->end()) ; + line != line_end ; ++line) + { + std::vector<std::string> tokens; + tokenise_whitespace_quoted(*line, std::back_inserter(tokens)); + + if (tokens.empty()) + continue; + + if ("source" == tokens.at(0)) + { + if (tokens.size() != 2) + throw PaludisConfigError("Invalid source line '" + *line + "'"); + + add(FSEntry(tokens.at(1))); + continue; + } + + Rule rule(make_named_values<Rule>( + value_for<n::action_requirement>("*"), + value_for<n::manager>("unset"), + value_for<n::matches_requirement>(make_null_shared_ptr()), + value_for<n::name_requirement>("*"), + value_for<n::output_exclusivity_requirement>(static_cast<OutputExclusivity>(-1)), + value_for<n::type_requirement>("*") + )); + + std::vector<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()); + + for ( ; t != t_end ; ++t) + { + if (*t == ":") + break; + + std::string::size_type p(t->find("=")); + if (std::string::npos != p) + set_rule(_imp->env, rule, t->substr(0, p), t->substr(p + 1)); + else + { + std::string r(*t); + if (++t == t_end) + throw PaludisConfigError("Expected '=' but found end of line for line '" + *line + "'"); + + if (*t != "=") + throw PaludisConfigError("Expected '=' but found '" + *t + "' for line '" + *line + "'"); + + if (++t == t_end) + throw PaludisConfigError("Expected value but found end of for line '" + *line + "'"); + + set_rule(_imp->env, rule, r, *t); + } + } + + if (t == t_end) + throw PaludisConfigError("Found no ':' for line '" + *line + "'"); + + if (++t == t_end) + throw PaludisConfigError("Found no manager after ':' for line '" + *line + "'"); + + rule.manager() = *t; + _imp->rules.push_back(rule); + + if (++t != t_end) + throw PaludisConfigError("Trailing text after manager on line '" + *line + "'"); + } +} + +const std::tr1::shared_ptr<OutputManager> +OutputConf::create_output_manager(const CreateOutputManagerInfo & i) const +{ + Context context("When creating output manager:"); + + for (RuleList::const_reverse_iterator r(_imp->rules.rbegin()), r_end(_imp->rules.rend()) ; + r != r_end ; ++r) + if (match_rule(_imp->env, *r, i)) + return _imp->env->create_named_output_manager(r->manager()); + + throw PaludisConfigError("No matching output manager rule specified"); +} + +template class PrivateImplementationPattern<paludis_environment::OutputConf>; + diff --git a/paludis/environments/paludis/output_conf.hh b/paludis/environments/paludis/output_conf.hh new file mode 100644 index 000000000..903b03cea --- /dev/null +++ b/paludis/environments/paludis/output_conf.hh @@ -0,0 +1,64 @@ +/* vim: set sw=4 sts=4 et foldmethod=syntax : */ + +/* + * Copyright (c) 2009 Ciaran McCreesh + * + * This file is part of the Paludis package manager. Paludis is free software; + * you can redistribute it and/or modify it under the terms of the GNU General + * Public License version 2, as published by the Free Software Foundation. + * + * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef PALUDIS_GUARD_PALUDIS_ENVIRONMENTS_PALUDIS_OUTPUT_CONF_HH +#define PALUDIS_GUARD_PALUDIS_ENVIRONMENTS_PALUDIS_OUTPUT_CONF_HH 1 + +#include <paludis/util/private_implementation_pattern.hh> +#include <paludis/util/instantiation_policy.hh> +#include <paludis/util/fs_entry-fwd.hh> +#include <paludis/output_manager-fwd.hh> +#include <paludis/create_output_manager_info-fwd.hh> +#include <tr1/memory> + +namespace paludis +{ + class PaludisEnvironment; + + namespace paludis_environment + { + class OutputConf : + private PrivateImplementationPattern<OutputConf>, + private InstantiationPolicy<OutputConf, instantiation_method::NonCopyableTag> + { + public: + ///\name Basic operations + ///\{ + + OutputConf(const PaludisEnvironment * const); + ~OutputConf(); + + ///\} + + /** + * Add another file. + */ + void add(const FSEntry &); + + const std::tr1::shared_ptr<OutputManager> create_output_manager( + const CreateOutputManagerInfo &) const; + }; + } + +#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE + extern template class PrivateImplementationPattern<paludis_environment::OutputConf>; +#endif +} + +#endif diff --git a/paludis/environments/paludis/output_managers.cc b/paludis/environments/paludis/output_managers.cc new file mode 100644 index 000000000..9ac7015d4 --- /dev/null +++ b/paludis/environments/paludis/output_managers.cc @@ -0,0 +1,95 @@ +/* vim: set sw=4 sts=4 et foldmethod=syntax : */ + +/* + * Copyright (c) 2009 Ciaran McCreesh + * + * This file is part of the Paludis package manager. Paludis is free software; + * you can redistribute it and/or modify it under the terms of the GNU General + * Public License version 2, as published by the Free Software Foundation. + * + * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <paludis/environments/paludis/output_managers.hh> +#include <paludis/environments/paludis/bashable_conf.hh> +#include <paludis/environments/paludis/paludis_config.hh> +#include <paludis/environments/paludis/paludis_environment.hh> +#include <paludis/util/private_implementation_pattern-impl.hh> +#include <paludis/util/config_file.hh> +#include <paludis/util/wrapped_forward_iterator.hh> +#include <paludis/util/map.hh> +#include <paludis/util/strip.hh> +#include <paludis/output_manager_factory.hh> +#include <tr1/unordered_map> + +using namespace paludis; +using namespace paludis::paludis_environment; + +namespace +{ + typedef std::tr1::unordered_map<std::string, std::tr1::shared_ptr<const KeyValueConfigFile> > Store; + + std::string from_kv(const std::tr1::shared_ptr<const KeyValueConfigFile> & m, + const std::string & k) + { + return m->get(k); + } +} + +namespace paludis +{ + template<> + struct Implementation<OutputManagers> + { + Store store; + }; +} + +OutputManagers::OutputManagers(const PaludisEnvironment * const) : + PrivateImplementationPattern<OutputManagers>(new Implementation<OutputManagers>) +{ +} + +OutputManagers::~OutputManagers() +{ +} + +void +OutputManagers::add(const FSEntry & filename) +{ + Context context("When adding source '" + stringify(filename) + "' as an output manager file:"); + + std::tr1::shared_ptr<KeyValueConfigFile> f(make_bashable_kv_conf(filename)); + if (! f) + return; + + std::string manager(filename.basename()); + manager = strip_trailing_string(manager, ".conf"); + manager = strip_trailing_string(manager, ".bash"); + + _imp->store[manager] = f; +} + +const std::tr1::shared_ptr<OutputManager> +OutputManagers::create_named_output_manager(const std::string & s) const +{ + Context context("When creating output manager named '" + s + "':"); + + Store::const_iterator i(_imp->store.find(s)); + if (i == _imp->store.end()) + throw PaludisConfigError("No output manager named '" + s + "' exists"); + + return OutputManagerFactory::get_instance()->create(std::tr1::bind(&from_kv, i->second, + std::tr1::placeholders::_1)); +} + +template class PrivateImplementationPattern<paludis_environment::OutputManagers>; + + diff --git a/paludis/environments/paludis/output_managers.hh b/paludis/environments/paludis/output_managers.hh new file mode 100644 index 000000000..ff69c6b83 --- /dev/null +++ b/paludis/environments/paludis/output_managers.hh @@ -0,0 +1,63 @@ +/* vim: set sw=4 sts=4 et foldmethod=syntax : */ + +/* + * Copyright (c) 2009 Ciaran McCreesh + * + * This file is part of the Paludis package manager. Paludis is free software; + * you can redistribute it and/or modify it under the terms of the GNU General + * Public License version 2, as published by the Free Software Foundation. + * + * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef PALUDIS_GUARD_PALUDIS_ENVIRONMENTS_PALUDIS_OUTPUT_MANAGERS_HH +#define PALUDIS_GUARD_PALUDIS_ENVIRONMENTS_PALUDIS_OUTPUT_MANAGERS_HH 1 + +#include <paludis/util/attributes.hh> +#include <paludis/util/private_implementation_pattern.hh> +#include <paludis/util/instantiation_policy.hh> +#include <paludis/util/fs_entry-fwd.hh> +#include <paludis/output_manager-fwd.hh> +#include <tr1/memory> + +namespace paludis +{ + class PaludisEnvironment; + + namespace paludis_environment + { + class OutputManagers : + private PrivateImplementationPattern<OutputManagers>, + private InstantiationPolicy<OutputManagers, instantiation_method::NonCopyableTag> + { + public: + ///\name Basic operations + ///\{ + + OutputManagers(const PaludisEnvironment * const); + ~OutputManagers(); + + ///\} + + /** + * Add another file. + */ + void add(const FSEntry &); + + const std::tr1::shared_ptr<OutputManager> create_named_output_manager(const std::string &) const; + }; + } + +#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE + extern template class PrivateImplementationPattern<paludis_environment::OutputManagers>; +#endif +} + +#endif diff --git a/paludis/environments/paludis/output_managers/Makefile.am b/paludis/environments/paludis/output_managers/Makefile.am new file mode 100644 index 000000000..07df6b425 --- /dev/null +++ b/paludis/environments/paludis/output_managers/Makefile.am @@ -0,0 +1,28 @@ +SUBDIRS = . +CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda *.loT *.epicfail +BUILT_SOURCES = +MAINTAINERCLEANFILES = Makefile.in +AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@ +DEFS= \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -DDATADIR=\"$(datadir)\" \ + -DLIBDIR=\"$(libdir)\" + +shareenvpaludisdir = $(sharedir)/paludis/environments/paludis/output_managers + +dist_shareenvpaludis_DATA = \ + standard.conf + +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + +distcheck-deps-local : $(DISTCHECK_DEPS) + +distcheck-deps : distcheck-deps-subdirs + +distcheck-deps-subdirs : + for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \ + else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done + + diff --git a/paludis/environments/paludis/output_managers/standard.conf b/paludis/environments/paludis/output_managers/standard.conf new file mode 100644 index 000000000..7b910c7db --- /dev/null +++ b/paludis/environments/paludis/output_managers/standard.conf @@ -0,0 +1,4 @@ +# This output manager sends stdout output to stdout and stderr output to +# stderr. There is no special handling for messages. + +handler = standard diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc index 157a1f4b3..1dc309e79 100644 --- a/paludis/environments/paludis/paludis_config.cc +++ b/paludis/environments/paludis/paludis_config.cc @@ -24,6 +24,8 @@ #include <paludis/environments/paludis/mirrors_conf.hh> #include <paludis/environments/paludis/licenses_conf.hh> #include <paludis/environments/paludis/package_mask_conf.hh> +#include <paludis/environments/paludis/output_conf.hh> +#include <paludis/environments/paludis/output_managers.hh> #include <paludis/environments/paludis/world.hh> #include <paludis/environments/paludis/extra_distribution_data.hh> @@ -180,6 +182,8 @@ namespace paludis std::tr1::shared_ptr<PackageMaskConf> package_mask_conf; std::tr1::shared_ptr<PackageMaskConf> package_unmask_conf; std::tr1::shared_ptr<MirrorsConf> mirrors_conf; + std::tr1::shared_ptr<OutputConf> output_conf; + std::tr1::shared_ptr<OutputManagers> output_managers; mutable std::tr1::shared_ptr<World> world; mutable Mutex reduced_mutex; @@ -210,6 +214,8 @@ namespace paludis package_mask_conf(new PackageMaskConf(e)), package_unmask_conf(new PackageMaskConf(e)), mirrors_conf(new MirrorsConf(e)), + output_conf(new OutputConf(e)), + output_managers(new OutputManagers(e)), has_environment_conf(false), accept_all_breaks_portage(false), reduced_username(getenv_with_default("PALUDIS_REDUCED_USERNAME", "paludisbuild")), @@ -654,6 +660,74 @@ PaludisConfig::PaludisConfig(PaludisEnvironment * const e, const std::string & s } } + /* output */ + { + std::list<FSEntry> files; + files.push_back(getenv_with_default("PALUDIS_DEFAULT_OUTPUT_CONF", + SHAREDIR "/paludis/environments/paludis/default_output.conf")); + files.push_back(local_config_dir / (dist->output_filename_part() + ".conf")); + files.push_back(local_config_dir / (dist->output_filename_part() + ".bash")); + if ((local_config_dir / (dist->output_filename_part() + ".conf.d")).exists()) + { + std::remove_copy_if(DirIterator(local_config_dir / (dist->output_filename_part() + ".conf.d")), DirIterator(), std::back_inserter(files), + std::tr1::bind(std::logical_not<bool>(), std::tr1::bind(&is_file_with_extension, _1, ".conf", IsFileWithOptions()))); + std::remove_copy_if(DirIterator(local_config_dir / (dist->output_filename_part() + ".conf.d")), DirIterator(), std::back_inserter(files), + std::tr1::bind(std::logical_not<bool>(), std::tr1::bind(&is_file_with_extension, _1, ".bash", IsFileWithOptions()))); + } + + bool any(false); + for (std::list<FSEntry>::const_iterator file(files.begin()), file_end(files.end()) ; + file != file_end ; ++file) + { + Context local_context("When reading output file '" + stringify(*file) + "':"); + + if (! file->exists()) + continue; + + _imp->output_conf->add(*file); + any = true; + } + + if (! any) + throw PaludisConfigError("No output confs found"); + } + + /* output managers */ + { + std::list<FSEntry> dirs, files; + dirs.push_back(getenv_with_default("PALUDIS_OUTPUT_MANAGERS_DIR", + SHAREDIR "/paludis/environments/paludis/output_managers/")); + dirs.push_back(local_config_dir / dist->output_managers_directory()); + + for (std::list<FSEntry>::const_iterator dir(dirs.begin()), dir_end(dirs.end()) ; + dir != dir_end ; ++dir) + { + if (! dir->exists()) + continue; + + std::remove_copy_if(DirIterator(*dir), DirIterator(), std::back_inserter(files), + std::tr1::bind(std::logical_not<bool>(), std::tr1::bind(&is_file_with_extension, _1, ".conf", IsFileWithOptions()))); + std::remove_copy_if(DirIterator(*dir), DirIterator(), std::back_inserter(files), + std::tr1::bind(std::logical_not<bool>(), std::tr1::bind(&is_file_with_extension, _1, ".bash", IsFileWithOptions()))); + } + + bool any(false); + for (std::list<FSEntry>::const_iterator file(files.begin()), file_end(files.end()) ; + file != file_end ; ++file) + { + Context local_context("When reading output manager file '" + stringify(*file) + "':"); + + if (! file->exists()) + continue; + + _imp->output_managers->add(*file); + any = true; + } + + if (! any) + throw PaludisConfigError("No output managers found"); + } + /* use */ { std::list<FSEntry> files; @@ -911,6 +985,12 @@ PaludisConfig::keywords_conf() const return _imp->keywords_conf; } +std::tr1::shared_ptr<const OutputConf> +PaludisConfig::output_conf() const +{ + return _imp->output_conf; +} + std::tr1::shared_ptr<const UseConf> PaludisConfig::use_conf() const { @@ -935,6 +1015,12 @@ PaludisConfig::package_unmask_conf() const return _imp->package_unmask_conf; } +std::tr1::shared_ptr<const OutputManagers> +PaludisConfig::output_managers() const +{ + return _imp->output_managers; +} + std::tr1::shared_ptr<const MirrorsConf> PaludisConfig::mirrors_conf() const { diff --git a/paludis/environments/paludis/paludis_config.hh b/paludis/environments/paludis/paludis_config.hh index 9f64c3f82..f3b1d94cf 100644 --- a/paludis/environments/paludis/paludis_config.hh +++ b/paludis/environments/paludis/paludis_config.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -50,6 +50,8 @@ namespace paludis struct LicensesConf; struct PackageMaskConf; struct MirrorsConf; + struct OutputConf; + struct OutputManagers; struct World; /** @@ -119,6 +121,8 @@ namespace paludis std::tr1::shared_ptr<const PackageMaskConf> package_unmask_conf() const; std::tr1::shared_ptr<const MirrorsConf> mirrors_conf() const; std::tr1::shared_ptr<const World> world() const; + std::tr1::shared_ptr<const OutputConf> output_conf() const; + std::tr1::shared_ptr<const OutputManagers> output_managers() const; ///\} diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc index efe095a54..36b2dcbbb 100644 --- a/paludis/environments/paludis/paludis_environment.cc +++ b/paludis/environments/paludis/paludis_environment.cc @@ -24,6 +24,8 @@ #include <paludis/environments/paludis/package_mask_conf.hh> #include <paludis/environments/paludis/licenses_conf.hh> #include <paludis/environments/paludis/mirrors_conf.hh> +#include <paludis/environments/paludis/output_conf.hh> +#include <paludis/environments/paludis/output_managers.hh> #include <paludis/environments/paludis/world.hh> #include <paludis/util/config_file.hh> @@ -552,8 +554,14 @@ PaludisEnvironment::known_choice_value_names( } const std::tr1::shared_ptr<OutputManager> -PaludisEnvironment::create_output_manager(const CreateOutputManagerInfo &) const +PaludisEnvironment::create_output_manager(const CreateOutputManagerInfo & i) const { - return make_shared_ptr(new StandardOutputManager); + return _imp->config->output_conf()->create_output_manager(i); +} + +const std::tr1::shared_ptr<OutputManager> +PaludisEnvironment::create_named_output_manager(const std::string & s) const +{ + return _imp->config->output_managers()->create_named_output_manager(s); } diff --git a/paludis/environments/paludis/paludis_environment.hh b/paludis/environments/paludis/paludis_environment.hh index 166e68756..2eb79f383 100644 --- a/paludis/environments/paludis/paludis_environment.hh +++ b/paludis/environments/paludis/paludis_environment.hh @@ -165,6 +165,8 @@ namespace paludis virtual const std::tr1::shared_ptr<OutputManager> create_output_manager( const CreateOutputManagerInfo &) const; + + const std::tr1::shared_ptr<OutputManager> create_named_output_manager(const std::string &) const; }; } #endif diff --git a/paludis/output_manager_factory.cc b/paludis/output_manager_factory.cc index 44228207b..b332cf159 100644 --- a/paludis/output_manager_factory.cc +++ b/paludis/output_manager_factory.cc @@ -33,8 +33,8 @@ #include <paludis/about.hh> #include <tr1/unordered_map> #include <list> -#include <dlfcn.h> -#include <stdint.h> + +#include <paludis/standard_output_manager.hh> using namespace paludis; @@ -58,7 +58,7 @@ namespace const Funcs & fetch(const Keys & keys, const std::string & key) { if (key.empty()) - throw ConfigurationError("Key 'manager' not specified when creating an output manager"); + throw ConfigurationError("Key 'handler' not specified when creating an output manager"); Keys::const_iterator i(keys.find(key)); if (i == keys.end()) @@ -82,6 +82,8 @@ namespace paludis OutputManagerFactory::OutputManagerFactory() : PrivateImplementationPattern<OutputManagerFactory>(new Implementation<OutputManagerFactory>) { + /* we might want to make this plugin loadable at some point */ + add_manager(StandardOutputManager::factory_managers(), StandardOutputManager::factory_create); } OutputManagerFactory::~OutputManagerFactory() @@ -94,7 +96,7 @@ OutputManagerFactory::create( ) const { Context context("When creating output manager:"); - return fetch(_imp->keys, key_function("manager")).create_function()(key_function); + return fetch(_imp->keys, key_function("handler")).create_function()(key_function); } OutputManagerFactory::ConstIterator diff --git a/paludis/output_manager_factory.hh b/paludis/output_manager_factory.hh index 124a26d9f..d6b78d4c5 100644 --- a/paludis/output_manager_factory.hh +++ b/paludis/output_manager_factory.hh @@ -53,7 +53,7 @@ namespace paludis * Construct a given OutputManager, or throw ConfigurationError. * * \param key_function should return the value for a given key. The - * 'manager' key must return a value (e.g. 'standard'), which is used + * 'handler' key must return a value (e.g. 'standard'), which is used * to select the return type. Other key names are manager defined, * but typically include things like 'location' and 'keep_on_success'. */ diff --git a/paludis/repositories/accounts/Makefile.am b/paludis/repositories/accounts/Makefile.am index 0cb9ec159..206bac0c4 100644 --- a/paludis/repositories/accounts/Makefile.am +++ b/paludis/repositories/accounts/Makefile.am @@ -77,6 +77,8 @@ TESTS_ENVIRONMENT = env \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ PALUDIS_NO_CHOWN="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ bash $(top_srcdir)/test/run_test.sh TESTS = \ diff --git a/paludis/repositories/cran/Makefile.am b/paludis/repositories/cran/Makefile.am index e8168c230..3b86eb67b 100644 --- a/paludis/repositories/cran/Makefile.am +++ b/paludis/repositories/cran/Makefile.am @@ -128,6 +128,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ bash $(top_srcdir)/test/run_test.sh diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am index 402a30ea3..7d49b80ce 100644 --- a/paludis/repositories/e/Makefile.am +++ b/paludis/repositories/e/Makefile.am @@ -426,6 +426,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_TESTS_KEEP_STDERR="yes" \ PALDUIS_TMPDIR="`pwd`" \ PALUDIS_BYPASS_USERPRIV_CHECKS="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ LD_LIBRARY_PATH="`echo $$LD_LIBRARY_PATH: | sed -e 's,^:,,'`` \ $(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/`:` \ $(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/.libs/`" \ diff --git a/paludis/repositories/e/ebuild/0/Makefile.am b/paludis/repositories/e/ebuild/0/Makefile.am index a287dce1b..449096c6b 100644 --- a/paludis/repositories/e/ebuild/0/Makefile.am +++ b/paludis/repositories/e/ebuild/0/Makefile.am @@ -49,6 +49,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \ PALUDIS_EBUILD_LOG_LEVEL="warning" \ PALUDIS_OPTIONS="" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_TMPDIR="`pwd`/" \ diff --git a/paludis/repositories/e/ebuild/1/Makefile.am b/paludis/repositories/e/ebuild/1/Makefile.am index 0a1b71c44..84f92d211 100644 --- a/paludis/repositories/e/ebuild/1/Makefile.am +++ b/paludis/repositories/e/ebuild/1/Makefile.am @@ -17,6 +17,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_EBUILD_LOG_LEVEL="warning" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_TMPDIR="`pwd`/" \ diff --git a/paludis/repositories/e/ebuild/2/Makefile.am b/paludis/repositories/e/ebuild/2/Makefile.am index 2661886fd..99c2fec8e 100644 --- a/paludis/repositories/e/ebuild/2/Makefile.am +++ b/paludis/repositories/e/ebuild/2/Makefile.am @@ -24,6 +24,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_EBUILD_LOG_LEVEL="warning" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_TMPDIR="`pwd`/" \ diff --git a/paludis/repositories/e/ebuild/Makefile.am b/paludis/repositories/e/ebuild/Makefile.am index fa58b96c7..2a5193e93 100644 --- a/paludis/repositories/e/ebuild/Makefile.am +++ b/paludis/repositories/e/ebuild/Makefile.am @@ -31,6 +31,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_EBUILD_LOG_LEVEL="warning" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_TMPDIR="`pwd`/" \ diff --git a/paludis/repositories/e/ebuild/exheres-0/Makefile.am b/paludis/repositories/e/ebuild/exheres-0/Makefile.am index 841960ea7..903b6dbc6 100644 --- a/paludis/repositories/e/ebuild/exheres-0/Makefile.am +++ b/paludis/repositories/e/ebuild/exheres-0/Makefile.am @@ -53,6 +53,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_OPTIONS="" \ PALUDIS_EBUILD_LOG_LEVEL="warning" \ PALUDIS_EBUILD_MODULE_SUFFIXES="exheres-0" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_TMPDIR="`pwd`/" \ diff --git a/paludis/repositories/e/ebuild/kdebuild-1/Makefile.am b/paludis/repositories/e/ebuild/kdebuild-1/Makefile.am index 28fa511a1..45020ad3b 100644 --- a/paludis/repositories/e/ebuild/kdebuild-1/Makefile.am +++ b/paludis/repositories/e/ebuild/kdebuild-1/Makefile.am @@ -16,6 +16,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_EBUILD_LOG_LEVEL="warning" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_TMPDIR="`pwd`/" \ diff --git a/paludis/repositories/e/ebuild/paludis-1/Makefile.am b/paludis/repositories/e/ebuild/paludis-1/Makefile.am index 9d392265d..1a2c266e2 100644 --- a/paludis/repositories/e/ebuild/paludis-1/Makefile.am +++ b/paludis/repositories/e/ebuild/paludis-1/Makefile.am @@ -16,6 +16,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_EBUILD_LOG_LEVEL="warning" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ bash $(top_srcdir)/test/run_test.sh $(top_srcdir)/paludis/repositories/e/ebuild/run_test.bash diff --git a/paludis/repositories/e/ebuild/pbin-1/Makefile.am b/paludis/repositories/e/ebuild/pbin-1/Makefile.am index a29479f75..88e082039 100644 --- a/paludis/repositories/e/ebuild/pbin-1/Makefile.am +++ b/paludis/repositories/e/ebuild/pbin-1/Makefile.am @@ -16,6 +16,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_EBUILD_LOG_LEVEL="warning" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_TMPDIR="`pwd`/" \ diff --git a/paludis/repositories/e/qa/Makefile.am b/paludis/repositories/e/qa/Makefile.am index c70c3e784..7eeb8ab17 100644 --- a/paludis/repositories/e/qa/Makefile.am +++ b/paludis/repositories/e/qa/Makefile.am @@ -138,6 +138,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_SKIP_CONFIG="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ LD_LIBRARY_PATH="`echo $$LD_LIBRARY_PATH: | sed -e 's,^:,,'`` \ diff --git a/paludis/repositories/fake/Makefile.am b/paludis/repositories/fake/Makefile.am index 25514b601..e0d76448f 100644 --- a/paludis/repositories/fake/Makefile.am +++ b/paludis/repositories/fake/Makefile.am @@ -16,6 +16,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_SKIP_CONFIG="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ LD_LIBRARY_PATH="`echo $$LD_LIBRARY_PATH: | sed -e 's,^:,,'`` \ diff --git a/paludis/repositories/gems/Makefile.am b/paludis/repositories/gems/Makefile.am index e759f6846..ccda0d2c4 100644 --- a/paludis/repositories/gems/Makefile.am +++ b/paludis/repositories/gems/Makefile.am @@ -124,6 +124,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_SKIP_CONFIG="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ LD_LIBRARY_PATH="`echo $$LD_LIBRARY_PATH: | sed -e 's,^:,,'`` \ diff --git a/paludis/repositories/unavailable/Makefile.am b/paludis/repositories/unavailable/Makefile.am index b03fe6963..475de43ff 100644 --- a/paludis/repositories/unavailable/Makefile.am +++ b/paludis/repositories/unavailable/Makefile.am @@ -71,6 +71,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_FETCHERS_DIR="$(top_srcdir)/paludis/fetchers/" \ PALUDIS_OPTIONS="" \ PALUDIS_SKIP_CONFIG="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ PALUDIS_NO_CHOWN="yes" \ diff --git a/paludis/repositories/unpackaged/Makefile.am b/paludis/repositories/unpackaged/Makefile.am index 8688874d9..fc9d1e505 100644 --- a/paludis/repositories/unpackaged/Makefile.am +++ b/paludis/repositories/unpackaged/Makefile.am @@ -110,6 +110,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_FETCHERS_DIR="$(top_srcdir)/paludis/fetchers/" \ PALUDIS_SKIP_CONFIG="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ PALUDIS_NO_CHOWN="yes" \ diff --git a/paludis/repositories/unwritten/Makefile.am b/paludis/repositories/unwritten/Makefile.am index 1e8a67410..d880a9028 100644 --- a/paludis/repositories/unwritten/Makefile.am +++ b/paludis/repositories/unwritten/Makefile.am @@ -70,6 +70,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_FETCHERS_DIR="$(top_srcdir)/paludis/fetchers/" \ PALUDIS_OPTIONS="" \ PALUDIS_SKIP_CONFIG="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ PALUDIS_NO_CHOWN="yes" \ diff --git a/paludis/repositories/virtuals/Makefile.am b/paludis/repositories/virtuals/Makefile.am index a7fd2e2d1..aa1c5de3d 100644 --- a/paludis/repositories/virtuals/Makefile.am +++ b/paludis/repositories/virtuals/Makefile.am @@ -59,6 +59,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_SKIP_CONFIG="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_SCRIPT_DIR="$(srcdir)/" \ PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \ LD_LIBRARY_PATH="`echo $$LD_LIBRARY_PATH: | sed -e 's,^:,,'`` \ diff --git a/paludis/standard_output_manager.cc b/paludis/standard_output_manager.cc index 2716ca482..e5460575a 100644 --- a/paludis/standard_output_manager.cc +++ b/paludis/standard_output_manager.cc @@ -18,6 +18,8 @@ */ #include <paludis/standard_output_manager.hh> +#include <paludis/util/set.hh> +#include <paludis/util/make_shared_ptr.hh> #include <iostream> using namespace paludis; @@ -52,3 +54,17 @@ StandardOutputManager::message(const MessageType, const std::string &) { } +const std::tr1::shared_ptr<const Set<std::string> > +StandardOutputManager::factory_managers() +{ + std::tr1::shared_ptr<Set<std::string> > result(new Set<std::string>); + result->insert("standard"); + return result; +} + +const std::tr1::shared_ptr<OutputManager> +StandardOutputManager::factory_create(const std::tr1::function<std::string (const std::string &)> &) +{ + return make_shared_ptr(new StandardOutputManager); +} + diff --git a/paludis/standard_output_manager.hh b/paludis/standard_output_manager.hh index 82bd73a69..b041620ac 100644 --- a/paludis/standard_output_manager.hh +++ b/paludis/standard_output_manager.hh @@ -22,6 +22,9 @@ #include <paludis/standard_output_manager-fwd.hh> #include <paludis/output_manager.hh> +#include <paludis/util/set-fwd.hh> +#include <tr1/memory> +#include <tr1/functional> namespace paludis { @@ -37,6 +40,13 @@ namespace paludis virtual void succeeded(); virtual void message(const MessageType, const std::string &); + + static const std::tr1::shared_ptr<const Set<std::string> > factory_managers() + PALUDIS_ATTRIBUTE((warn_unused_result)); + + static const std::tr1::shared_ptr<OutputManager> factory_create( + const std::tr1::function<std::string (const std::string &)> &) + PALUDIS_ATTRIBUTE((warn_unused_result)); }; } diff --git a/python/Makefile.am b/python/Makefile.am index 7318cd24c..fa2a2ff0e 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -130,6 +130,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_REPOSITORY_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories`" \ PALUDIS_ENVIRONMENT_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments`" \ PALUDIS_ENABLE_VIRTUALS_REPOSITORY="$(PALUDIS_ENABLE_VIRTUALS_REPOSITORY_VALUE)" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ SYSCONFDIR="$(sysconfdir)" \ LD_LIBRARY_PATH="`echo $$LD_LIBRARY_PATH: | sed -e 's,^:,,'`` \ echo "\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/.libs\`: \ diff --git a/ruby/Makefile.am b/ruby/Makefile.am index dbce88390..5c51f67c2 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -112,6 +112,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_REPOSITORY_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories`" \ PALUDIS_ENVIRONMENT_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments`" \ PALUDIS_ENABLE_VIRTUALS_REPOSITORY="$(PALUDIS_ENABLE_VIRTUALS_REPOSITORY_VALUE)" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ SYSCONFDIR="$(sysconfdir)" \ LD_LIBRARY_PATH=`echo "\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/.libs\`: \ \`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/.libs\`: \ diff --git a/ruby/demos/Makefile.am b/ruby/demos/Makefile.am index c7517e2e0..158b81b37 100644 --- a/ruby/demos/Makefile.am +++ b/ruby/demos/Makefile.am @@ -33,6 +33,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_REPOSITORY_SO_DIR="`$(top_srcdir)/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ SYSCONFDIR="$(sysconfdir)" \ LD_LIBRARY_PATH="`$(top_srcdir)/ebuild/utils/canonicalise $(top_builddir)/paludis/.libs`" \ bash $(top_srcdir)/test/run_test.sh "ruby -I ../.libs/" diff --git a/src/clients/accerso/Makefile.am b/src/clients/accerso/Makefile.am index 2e7062c20..635fd41c2 100644 --- a/src/clients/accerso/Makefile.am +++ b/src/clients/accerso/Makefile.am @@ -56,6 +56,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_NO_CHOWN="yupyup" \ PALUDIS_REDUCED_USERNAME="`id -un`" \ PALUDIS_OUTPUTWRAPPER_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_OUTPUT_WRAPPER="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/outputwrapper`" \ SYSCONFDIR="$(sysconfdir)" \ bash $(top_srcdir)/test/run_test.sh bash diff --git a/src/clients/adjutrix/Makefile.am b/src/clients/adjutrix/Makefile.am index 7d9342562..d1419314d 100644 --- a/src/clients/adjutrix/Makefile.am +++ b/src/clients/adjutrix/Makefile.am @@ -66,6 +66,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_OPTIONS="" \ PALUDIS_REPOSITORY_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ SYSCONFDIR="$(sysconfdir)" \ ADJUTRIX_OPTIONS="" \ TEST_OUTPUT_WRAPPER="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/outputwrapper`" \ diff --git a/src/clients/appareo/Makefile.am b/src/clients/appareo/Makefile.am index b6c34b403..ce56b9d2c 100644 --- a/src/clients/appareo/Makefile.am +++ b/src/clients/appareo/Makefile.am @@ -53,6 +53,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_REPOSITORY_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories`" \ PALUDIS_ENVIRONMENT_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ PALUDIS_NO_CHOWN="yupyup" \ PALUDIS_REDUCED_USERNAME="`id -un`" \ PALUDIS_OUTPUTWRAPPER_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \ diff --git a/src/clients/cave/Makefile.am b/src/clients/cave/Makefile.am index 26f94ad38..a75c1bc84 100644 --- a/src/clients/cave/Makefile.am +++ b/src/clients/cave/Makefile.am @@ -128,6 +128,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_NO_CHOWN="yupyup" \ PALUDIS_REDUCED_USERNAME="`id -un`" \ PALUDIS_OUTPUTWRAPPER_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_OUTPUT_WRAPPER="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/outputwrapper`" \ SYSCONFDIR="$(sysconfdir)" \ bash $(top_srcdir)/test/run_test.sh bash diff --git a/src/clients/importare/Makefile.am b/src/clients/importare/Makefile.am index b15637499..8fe3f3262 100644 --- a/src/clients/importare/Makefile.am +++ b/src/clients/importare/Makefile.am @@ -50,6 +50,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_NO_CHOWN="yupyup" \ PALUDIS_REDUCED_USERNAME="`id -un`" \ PALUDIS_OUTPUTWRAPPER_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_OUTPUT_WRAPPER="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/outputwrapper`" \ SYSCONFDIR="$(sysconfdir)" \ bash $(top_srcdir)/test/run_test.sh bash diff --git a/src/clients/inquisitio/Makefile.am b/src/clients/inquisitio/Makefile.am index 9963ab50d..418413453 100644 --- a/src/clients/inquisitio/Makefile.am +++ b/src/clients/inquisitio/Makefile.am @@ -62,6 +62,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \ PALUDIS_DISTRIBUTION="gentoo" \ PALUDIS_REPOSITORY_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ SYSCONFDIR="$(sysconfdir)" \ bash $(top_srcdir)/test/run_test.sh bash diff --git a/src/clients/instruo/Makefile.am b/src/clients/instruo/Makefile.am index 0d5432a3a..3b7720aae 100644 --- a/src/clients/instruo/Makefile.am +++ b/src/clients/instruo/Makefile.am @@ -55,6 +55,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_NO_CHOWN="yupyup" \ PALUDIS_REDUCED_USERNAME="`id -un`" \ PALUDIS_OUTPUTWRAPPER_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_OUTPUT_WRAPPER="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/outputwrapper`" \ SYSCONFDIR="$(sysconfdir)" \ bash $(top_srcdir)/test/run_test.sh bash diff --git a/src/clients/paludis/Makefile.am b/src/clients/paludis/Makefile.am index 852ecb915..05482a8ac 100644 --- a/src/clients/paludis/Makefile.am +++ b/src/clients/paludis/Makefile.am @@ -71,6 +71,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_REDUCED_USERNAME="`id -un`" \ PALUDIS_OUTPUTWRAPPER_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \ PALUDIS_BYPASS_USERPRIV_CHECKS="yes" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_OUTPUT_WRAPPER="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/outputwrapper`" \ SYSCONFDIR="$(sysconfdir)" \ bash $(top_srcdir)/test/run_test.sh bash diff --git a/src/clients/reconcilio/Makefile.am b/src/clients/reconcilio/Makefile.am index 6c4a78c0c..c602bd373 100644 --- a/src/clients/reconcilio/Makefile.am +++ b/src/clients/reconcilio/Makefile.am @@ -70,6 +70,8 @@ TESTS_ENVIRONMENT = env \ PALUDIS_NO_CHOWN="yupyup" \ PALUDIS_REDUCED_USERNAME="`id -un`" \ PALUDIS_OUTPUTWRAPPER_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \ + PALUDIS_DEFAULT_OUTPUT_CONF="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/default_output.conf`" \ + PALUDIS_OUTPUT_MANAGERS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/output_managers/`" \ TEST_OUTPUT_WRAPPER="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/outputwrapper`" \ SYSCONFDIR="$(sysconfdir)" \ bash $(top_srcdir)/test/run_test.sh bash |