diff options
author | 2010-05-19 16:01:04 +0100 | |
---|---|---|
committer | 2010-05-19 16:01:04 +0100 | |
commit | cc129190d549f69eccc67407946261544d538a91 (patch) | |
tree | 08f0ffe78b5c3f63dfc89d32dba1d828a5107dd0 /paludis/repositories | |
parent | b22056183d6a0e94e28e025c6bae6970979c26c0 (diff) | |
download | paludis-cc129190d549f69eccc67407946261544d538a91.tar.gz paludis-cc129190d549f69eccc67407946261544d538a91.tar.xz |
New improved NamedValue syntax
Diffstat (limited to 'paludis/repositories')
116 files changed, 2299 insertions, 2301 deletions
diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc index 36d81228a..ead96d441 100644 --- a/paludis/repositories/accounts/accounts_id.cc +++ b/paludis/repositories/accounts/accounts_id.cc @@ -488,16 +488,16 @@ AccountsID::perform_action(Action & action) const { (*install_action->options.destination()).destination_interface()->merge( make_named_values<MergeParams>( - value_for<n::build_start_time>(build_start_time), - value_for<n::environment_file>(FSEntry("/dev/null")), - value_for<n::image_dir>(fs_location_key()->value()), - value_for<n::merged_entries>(make_shared_ptr(new FSEntrySet)), - value_for<n::options>(MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs), - value_for<n::output_manager>(output_manager), - value_for<n::package_id>(shared_from_this()), - value_for<n::perform_uninstall>(install_action->options.perform_uninstall()), - value_for<n::used_this_for_config_protect>(std::tr1::bind( - &used_this_for_config_protect, std::tr1::ref(used_config_protect), std::tr1::placeholders::_1)) + n::build_start_time() = build_start_time, + n::environment_file() = FSEntry("/dev/null"), + n::image_dir() = fs_location_key()->value(), + n::merged_entries() = make_shared_ptr(new FSEntrySet), + n::options() = MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs, + n::output_manager() = output_manager, + n::package_id() = shared_from_this(), + n::perform_uninstall() = install_action->options.perform_uninstall(), + n::used_this_for_config_protect() = std::tr1::bind( + &used_this_for_config_protect, std::tr1::ref(used_config_protect), std::tr1::placeholders::_1) )); } break; @@ -522,11 +522,11 @@ AccountsID::perform_action(Action & action) const else { UninstallActionOptions uo(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(used_config_protect), - value_for<n::if_for_install_id>(shared_from_this()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1)) + n::config_protect() = used_config_protect, + n::if_for_install_id() = shared_from_this(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1) )); install_action->options.perform_uninstall()(*i, uo); } diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc index a336ad98f..bb4bad794 100644 --- a/paludis/repositories/accounts/accounts_repository.cc +++ b/paludis/repositories/accounts/accounts_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2009 Ciaran McCreesh + * Copyright (c) 2009, 2010 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 @@ -111,12 +111,12 @@ AccountsRepository::AccountsRepository(const AccountsRepositoryParams & p) : p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), _imp(PrivateImplementationPattern<AccountsRepository>::_imp) { @@ -129,12 +129,12 @@ AccountsRepository::AccountsRepository(const InstalledAccountsRepositoryParams & p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(this), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = this, + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), _imp(PrivateImplementationPattern<AccountsRepository>::_imp) { @@ -173,8 +173,8 @@ AccountsRepository::repository_factory_create( return std::tr1::shared_ptr<AccountsRepository>(new AccountsRepository( make_named_values<AccountsRepositoryParams>( - value_for<n::environment>(env), - value_for<n::name>(RepositoryName(name_str)) + n::environment() = env, + n::name() = RepositoryName(name_str) ))); } @@ -202,10 +202,10 @@ AccountsRepository::repository_factory_installed_create( return std::tr1::shared_ptr<AccountsRepository>(new AccountsRepository( make_named_values<InstalledAccountsRepositoryParams>( - value_for<n::environment>(env), - value_for<n::handler>(handler), - value_for<n::name>(RepositoryName(name_str)), - value_for<n::root>(FSEntry(root_str)) + n::environment() = env, + n::handler() = handler, + n::name() = RepositoryName(name_str), + n::root() = FSEntry(root_str) ))); } @@ -437,7 +437,7 @@ AccountsRepository::populate_sets() const HookResult AccountsRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } bool diff --git a/paludis/repositories/accounts/accounts_repository.hh b/paludis/repositories/accounts/accounts_repository.hh index 7562aec23..9ddedcba9 100644 --- a/paludis/repositories/accounts/accounts_repository.hh +++ b/paludis/repositories/accounts/accounts_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2009 Ciaran McCreesh + * Copyright (c) 2009, 2010 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,11 +29,11 @@ namespace paludis { namespace n { - struct environment; - struct handler; - struct installed; - struct name; - struct root; + typedef Name<struct environment_name> environment; + typedef Name<struct handler_name> handler; + typedef Name<struct installed_name> installed; + typedef Name<struct name_name> name; + typedef Name<struct root_name> root; } namespace accounts_repository diff --git a/paludis/repositories/accounts/accounts_repository_TEST.cc b/paludis/repositories/accounts/accounts_repository_TEST.cc index b8bf04ea9..b9a3b492a 100644 --- a/paludis/repositories/accounts/accounts_repository_TEST.cc +++ b/paludis/repositories/accounts/accounts_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2009 Ciaran McCreesh + * Copyright (c) 2009, 2010 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 @@ -49,8 +49,8 @@ namespace test_cases TestEnvironment env; std::tr1::shared_ptr<AccountsRepository> repo(new AccountsRepository( make_named_values<AccountsRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("accounts")) + n::environment() = &env, + n::name() = RepositoryName("accounts") ))); env.package_database()->add_repository(1, repo); TEST_CHECK_STRINGIFY_EQUAL(repo->name(), "accounts"); diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc index fc240b41d..0c641d05f 100644 --- a/paludis/repositories/cran/cran_installed_repository.cc +++ b/paludis/repositories/cran/cran_installed_repository.cc @@ -2,7 +2,7 @@ /* * Copyright (c) 2006, 2007 Danny van Dyk - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -164,12 +164,12 @@ CRANInstalledRepository::CRANInstalledRepository(const CRANInstalledRepositoryPa p.environment(), RepositoryName("installed-cran"), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(this), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = this, + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), PrivateImplementationPattern<CRANInstalledRepository>(new Implementation<CRANInstalledRepository>(p)), _imp(PrivateImplementationPattern<CRANInstalledRepository>::_imp) @@ -395,9 +395,9 @@ CRANInstalledRepository::repository_factory_create( throw CRANInstalledRepositoryConfigurationError("Key 'world' is no longer supported."); return std::tr1::shared_ptr<Repository>(new CRANInstalledRepository(make_named_values<CRANInstalledRepositoryParams>( - value_for<n::environment>(env), - value_for<n::location>(location), - value_for<n::root>(root) + n::environment() = env, + n::location() = location, + n::root() = root ))); } @@ -582,7 +582,7 @@ CRANInstalledRepository::populate_sets() const HookResult CRANInstalledRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } bool diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh index e335c937e..1b47088f1 100644 --- a/paludis/repositories/cran/cran_installed_repository.hh +++ b/paludis/repositories/cran/cran_installed_repository.hh @@ -2,7 +2,7 @@ /* * Copyright (c) 2006 Danny van Dyk - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -37,9 +37,9 @@ namespace paludis { namespace n { - struct environment; - struct location; - struct root; + typedef Name<struct environment_name> environment; + typedef Name<struct location_name> location; + typedef Name<struct root_name> root; } /** diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc index e9507fc23..caaa08f10 100644 --- a/paludis/repositories/cran/cran_repository.cc +++ b/paludis/repositories/cran/cran_repository.cc @@ -2,7 +2,7 @@ /* * Copyright (c) 2006, 2007 Danny van Dyk - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -111,12 +111,12 @@ CRANRepository::CRANRepository(const CRANRepositoryParams & p) : p.environment(), CRANRepository::fetch_repo_name(stringify(p.location())), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), PrivateImplementationPattern<CRANRepository>(new Implementation<CRANRepository>(p, make_shared_ptr(new Mutex))), _imp(PrivateImplementationPattern<CRANRepository>::_imp) @@ -422,13 +422,13 @@ CRANRepository::repository_factory_create( builddir = "/var/tmp/paludis"; return std::tr1::shared_ptr<Repository>(new CRANRepository(make_named_values<CRANRepositoryParams>( - value_for<n::builddir>(builddir), - value_for<n::distdir>(distdir), - value_for<n::environment>(env), - value_for<n::library>(library), - value_for<n::location>(location), - value_for<n::mirror>(mirror), - value_for<n::sync>(sync) + n::builddir() = builddir, + n::distdir() = distdir, + n::environment() = env, + n::library() = library, + n::location() = location, + n::mirror() = mirror, + n::sync() = sync ))); } @@ -560,7 +560,7 @@ CRANRepository::populate_sets() const HookResult CRANRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } const std::tr1::shared_ptr<const MetadataValueKey<std::string> > diff --git a/paludis/repositories/cran/cran_repository.hh b/paludis/repositories/cran/cran_repository.hh index 73d7c0649..2c722f124 100644 --- a/paludis/repositories/cran/cran_repository.hh +++ b/paludis/repositories/cran/cran_repository.hh @@ -2,7 +2,7 @@ /* * Copyright (c) 2006 Danny van Dyk - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -40,13 +40,13 @@ namespace paludis namespace n { - struct builddir; - struct distdir; - struct environment; - struct library; - struct location; - struct mirror; - struct sync; + typedef Name<struct builddir_name> builddir; + typedef Name<struct distdir_name> distdir; + typedef Name<struct environment_name> environment; + typedef Name<struct library_name> library; + typedef Name<struct location_name> location; + typedef Name<struct mirror_name> mirror; + typedef Name<struct sync_name> sync; } /** diff --git a/paludis/repositories/cran/package_dep_spec.cc b/paludis/repositories/cran/package_dep_spec.cc index fe8acb37a..d7cbc5d83 100644 --- a/paludis/repositories/cran/package_dep_spec.cc +++ b/paludis/repositories/cran/package_dep_spec.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -201,8 +201,8 @@ paludis::cranrepository::parse_cran_package_dep_spec(const std::string & ss) if (subtokens.size() != 2) throw PackageDepSpecError("Invalid () entry '" + *t + "' in '" + ss + "'"); data->version_requirement(make_named_values<VersionRequirement>( - value_for<n::version_operator>(VersionOperator(subtokens[0])), - value_for<n::version_spec>(VersionSpec(cran_version_to_internal(subtokens[1]), VersionSpecOptions())))); + n::version_operator() = VersionOperator(subtokens[0]), + n::version_spec() = VersionSpec(cran_version_to_internal(subtokens[1]), VersionSpecOptions()))); } } diff --git a/paludis/repositories/e/aa_visitor_TEST.cc b/paludis/repositories/e/aa_visitor_TEST.cc index 89df618c2..84655a10a 100644 --- a/paludis/repositories/e/aa_visitor_TEST.cc +++ b/paludis/repositories/e/aa_visitor_TEST.cc @@ -43,8 +43,8 @@ namespace test_cases { TestEnvironment env; std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo"))))); + n::environment() = &env, + n::name() = RepositoryName("repo")))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); diff --git a/paludis/repositories/e/check_fetched_files_visitor.cc b/paludis/repositories/e/check_fetched_files_visitor.cc index 288fd2f39..b978d7fa5 100644 --- a/paludis/repositories/e/check_fetched_files_visitor.cc +++ b/paludis/repositories/e/check_fetched_files_visitor.cc @@ -203,10 +203,10 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile) case manifest_require: case last_manifest: _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(false), - value_for<n::failed_integrity_checks>("No Manifest available"), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(stringify(distfile.basename())) + n::failed_automatic_fetching() = false, + n::failed_integrity_checks() = "No Manifest available", + n::requires_manual_fetching() = false, + n::target_file() = stringify(distfile.basename()) )); return false; @@ -234,10 +234,10 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile) << "Malformed Manifest: no file size found"; _imp->output_manager->stdout_stream() << "incorrect size"; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(false), - value_for<n::failed_integrity_checks>("Incorrect file size"), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(stringify(distfile.basename())) + n::failed_automatic_fetching() = false, + n::failed_integrity_checks() = "Incorrect file size", + n::requires_manual_fetching() = false, + n::target_file() = stringify(distfile.basename()) )); return false; } @@ -258,10 +258,10 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile) << "Malformed Manifest: failed RMD160 checksum"; _imp->output_manager->stdout_stream() << "failed RMD160"; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(false), - value_for<n::failed_integrity_checks>("Failed RMD160 checksum"), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(stringify(distfile.basename())) + n::failed_automatic_fetching() = false, + n::failed_integrity_checks() = "Failed RMD160 checksum", + n::requires_manual_fetching() = false, + n::target_file() = stringify(distfile.basename()) )); return false; } @@ -279,10 +279,10 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile) << "Malformed Manifest: failed SHA1 checksum"; _imp->output_manager->stdout_stream() << "failed SHA1"; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(false), - value_for<n::failed_integrity_checks>("Failed SHA1 checksum"), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(stringify(distfile.basename())) + n::failed_automatic_fetching() = false, + n::failed_integrity_checks() = "Failed SHA1 checksum", + n::requires_manual_fetching() = false, + n::target_file() = stringify(distfile.basename()) )); return false; } @@ -300,10 +300,10 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile) << "Malformed Manifest: failed SHA256 checksum"; _imp->output_manager->stdout_stream() << "failed SHA256"; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(false), - value_for<n::failed_integrity_checks>("Failed SHA256 checksum"), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(stringify(distfile.basename())) + n::failed_automatic_fetching() = false, + n::failed_integrity_checks() = "Failed SHA256 checksum", + n::requires_manual_fetching() = false, + n::target_file() = stringify(distfile.basename()) )); return false; } @@ -321,10 +321,10 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile) << "Malformed Manifest: failed MD5 checksum"; _imp->output_manager->stdout_stream() << "failed MD5"; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(false), - value_for<n::failed_integrity_checks>("Failed MD5 checksum"), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(stringify(distfile.basename())) + n::failed_automatic_fetching() = false, + n::failed_integrity_checks() = "Failed MD5 checksum", + n::requires_manual_fetching() = false, + n::target_file() = stringify(distfile.basename()) )); return false; } @@ -336,10 +336,10 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile) { _imp->output_manager->stdout_stream() << "unreadable file"; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(true), - value_for<n::failed_integrity_checks>("Unreadable file"), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(stringify(distfile.basename())) + n::failed_automatic_fetching() = true, + n::failed_integrity_checks() = "Unreadable file", + n::requires_manual_fetching() = false, + n::target_file() = stringify(distfile.basename()) )); return false; } @@ -349,10 +349,10 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile) { _imp->output_manager->stdout_stream() << "not in Manifest"; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(false), - value_for<n::failed_integrity_checks>("Not in Manifest"), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(stringify(distfile.basename())) + n::failed_automatic_fetching() = false, + n::failed_integrity_checks() = "Not in Manifest", + n::requires_manual_fetching() = false, + n::target_file() = stringify(distfile.basename()) )); return false; } @@ -386,10 +386,10 @@ CheckFetchedFilesVisitor::visit(const FetchableURISpecTree::NodeType<FetchableUR _imp->output_manager->stdout_stream() << "requires manual fetch"; _imp->need_nofetch = true; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(false), - value_for<n::failed_integrity_checks>(""), - value_for<n::requires_manual_fetching>(true), - value_for<n::target_file>(node.spec()->filename()) + n::failed_automatic_fetching() = false, + n::failed_integrity_checks() = "", + n::requires_manual_fetching() = true, + n::target_file() = node.spec()->filename() )); } } @@ -399,10 +399,10 @@ CheckFetchedFilesVisitor::visit(const FetchableURISpecTree::NodeType<FetchableUR << "Automatic fetch failed for '" << node.spec()->filename() << "'"; _imp->output_manager->stdout_stream() << "does not exist"; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(true), - value_for<n::failed_integrity_checks>(""), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(node.spec()->filename()) + n::failed_automatic_fetching() = true, + n::failed_integrity_checks() = "", + n::requires_manual_fetching() = false, + n::target_file() = node.spec()->filename() )); } else @@ -413,10 +413,10 @@ CheckFetchedFilesVisitor::visit(const FetchableURISpecTree::NodeType<FetchableUR Log::get_instance()->message("e.check_fetched_files.empty", ll_debug, lc_context) << "Empty file for '" << node.spec()->filename() << "'"; _imp->output_manager->stdout_stream() << "empty file"; _imp->failures->push_back(make_named_values<FetchActionFailure>( - value_for<n::failed_automatic_fetching>(false), - value_for<n::failed_integrity_checks>("SIZE (empty file)"), - value_for<n::requires_manual_fetching>(false), - value_for<n::target_file>(node.spec()->filename()) + n::failed_automatic_fetching() = false, + n::failed_integrity_checks() = "SIZE (empty file)", + n::requires_manual_fetching() = false, + n::target_file() = node.spec()->filename() )); } else if (! check_distfile_manifest(_imp->distdir / node.spec()->filename())) diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc index 509762c83..14f8b4a41 100644 --- a/paludis/repositories/e/dep_parser.cc +++ b/paludis/repositories/e/dep_parser.cc @@ -58,8 +58,8 @@ namespace paludis { namespace n { - struct item; - struct spec; + typedef Name<struct item_name> item; + typedef Name<struct spec_name> spec; } } @@ -253,8 +253,8 @@ namespace { std::tr1::shared_ptr<A_> spec(new A_); stack.push_front(make_named_values<typename ParseStackTypes<T_>::Item>( - value_for<n::item>(stack.begin()->item()->append(spec)), - value_for<n::spec>(spec) + n::item() = stack.begin()->item()->append(spec), + n::spec() = spec )); } @@ -268,8 +268,8 @@ namespace std::tr1::shared_ptr<ConditionalDepSpec> spec(new ConditionalDepSpec(parse_elike_conditional_dep_spec( u, env, id, id->repository()->installed_root_key()))); stack.push_front(make_named_values<typename ParseStackTypes<T_>::Item>( - value_for<n::item>(stack.begin()->item()->append(spec)), - value_for<n::spec>(spec) + n::item() = stack.begin()->item()->append(spec), + n::spec() = spec )); } @@ -325,31 +325,31 @@ paludis::erepository::parse_depend(const std::string & s, std::tr1::shared_ptr<DepSpec> thing_to_annotate(spec); std::tr1::shared_ptr<DependencySpecTree> top(make_shared_ptr(new DependencySpecTree(spec))); stack.push_front(make_named_values<ParseStackTypes<DependencySpecTree>::Item>( - value_for<n::item>(top->root()), - value_for<n::spec>(spec) + n::item() = top->root(), + n::spec() = spec )); ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<DependencySpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1)), - value_for<n::on_any>(std::tr1::bind(&any_all_handler<DependencySpecTree, AnyDepSpec>, std::tr1::ref(stack))), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&dependency_label_handler<DependencySpecTree>, - std::tr1::ref(stack), - ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), - id, _1, eapi)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<DependencySpecTree>, std::tr1::ref(stack), - ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<DependencySpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&package_or_block_dep_spec_string_handler<DependencySpecTree>, std::tr1::ref(stack), - ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1, eapi, id)), - value_for<n::on_use>(std::tr1::bind(&use_handler<DependencySpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(std::tr1::bind(&use_under_any_handler, s, eapi)) + n::on_all() = std::tr1::bind(&any_all_handler<DependencySpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1), + n::on_any() = std::tr1::bind(&any_all_handler<DependencySpecTree, AnyDepSpec>, std::tr1::ref(stack)), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&dependency_label_handler<DependencySpecTree>, + std::tr1::ref(stack), + ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), + id, _1, eapi), + n::on_pop() = std::tr1::bind(&pop_handler<DependencySpecTree>, std::tr1::ref(stack), + ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<DependencySpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&package_or_block_dep_spec_string_handler<DependencySpecTree>, std::tr1::ref(stack), + ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1, eapi, id), + n::on_use() = std::tr1::bind(&use_handler<DependencySpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = std::tr1::bind(&use_under_any_handler, s, eapi) )); parse_elike_dependencies(s, callbacks); @@ -368,27 +368,27 @@ paludis::erepository::parse_provide(const std::string & s, std::tr1::shared_ptr<DepSpec> thing_to_annotate(spec); std::tr1::shared_ptr<ProvideSpecTree> top(make_shared_ptr(new ProvideSpecTree(spec))); stack.push_front(make_named_values<ParseStackTypes<ProvideSpecTree>::Item>( - value_for<n::item>(top->root()), - value_for<n::spec>(spec) + n::item() = top->root(), + n::spec() = spec )); ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<ProvideSpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1)), - value_for<n::on_any>(std::tr1::bind(&any_not_allowed_handler, s)), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&labels_not_allowed_handler, s, _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<ProvideSpecTree>, std::tr1::ref(stack), - ParseStackTypes<ProvideSpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<ProvideSpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&package_dep_spec_string_handler<ProvideSpecTree>, std::tr1::ref(stack), - ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1, eapi, id)), - value_for<n::on_use>(std::tr1::bind(&use_handler<ProvideSpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(std::tr1::bind(&use_under_any_handler, s, eapi)) + n::on_all() = std::tr1::bind(&any_all_handler<ProvideSpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1), + n::on_any() = std::tr1::bind(&any_not_allowed_handler, s), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&labels_not_allowed_handler, s, _1), + n::on_pop() = std::tr1::bind(&pop_handler<ProvideSpecTree>, std::tr1::ref(stack), + ParseStackTypes<ProvideSpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<ProvideSpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&package_dep_spec_string_handler<ProvideSpecTree>, std::tr1::ref(stack), + ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1, eapi, id), + n::on_use() = std::tr1::bind(&use_handler<ProvideSpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = std::tr1::bind(&use_under_any_handler, s, eapi) )); parse_elike_dependencies(s, callbacks); @@ -407,31 +407,31 @@ paludis::erepository::parse_fetchable_uri(const std::string & s, std::tr1::shared_ptr<DepSpec> thing_to_annotate(spec); std::tr1::shared_ptr<FetchableURISpecTree> top(make_shared_ptr(new FetchableURISpecTree(spec))); stack.push_front(make_named_values<ParseStackTypes<FetchableURISpecTree>::Item>( - value_for<n::item>(top->root()), - value_for<n::spec>(spec) + n::item() = top->root(), + n::spec() = spec )); ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<FetchableURISpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1)), - value_for<n::on_any>(std::tr1::bind(&any_not_allowed_handler, s)), - value_for<n::on_arrow>(std::tr1::bind(&arrow_handler<FetchableURISpecTree>, std::tr1::ref(stack), - ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s, _1, _2, eapi)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&fetchable_label_handler<FetchableURISpecTree>, std::tr1::ref(stack), - ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1, eapi)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<FetchableURISpecTree>, std::tr1::ref(stack), - ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<FetchableURISpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&arrow_handler<FetchableURISpecTree>, std::tr1::ref(stack), - ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s, _1, "", eapi)), - value_for<n::on_use>(std::tr1::bind(&use_handler<FetchableURISpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(std::tr1::bind(&use_under_any_handler, s, eapi)) + n::on_all() = std::tr1::bind(&any_all_handler<FetchableURISpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1), + n::on_any() = std::tr1::bind(&any_not_allowed_handler, s), + n::on_arrow() = std::tr1::bind(&arrow_handler<FetchableURISpecTree>, std::tr1::ref(stack), + ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s, _1, _2, eapi), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&fetchable_label_handler<FetchableURISpecTree>, std::tr1::ref(stack), + ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1, eapi), + n::on_pop() = std::tr1::bind(&pop_handler<FetchableURISpecTree>, std::tr1::ref(stack), + ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<FetchableURISpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&arrow_handler<FetchableURISpecTree>, std::tr1::ref(stack), + ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s, _1, "", eapi), + n::on_use() = std::tr1::bind(&use_handler<FetchableURISpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = std::tr1::bind(&use_under_any_handler, s, eapi) )); parse_elike_dependencies(s, callbacks); @@ -450,27 +450,27 @@ paludis::erepository::parse_simple_uri(const std::string & s, std::tr1::shared_ptr<DepSpec> thing_to_annotate(spec); std::tr1::shared_ptr<SimpleURISpecTree> top(make_shared_ptr(new SimpleURISpecTree(spec))); stack.push_front(make_named_values<ParseStackTypes<SimpleURISpecTree>::Item>( - value_for<n::item>(top->root()), - value_for<n::spec>(spec) + n::item() = top->root(), + n::spec() = spec )); ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<SimpleURISpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1)), - value_for<n::on_any>(std::tr1::bind(&any_not_allowed_handler, s)), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&labels_not_allowed_handler, s, _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<SimpleURISpecTree>, std::tr1::ref(stack), - ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<SimpleURISpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&simple_uri_handler<SimpleURISpecTree>, std::tr1::ref(stack), - ParseStackTypes<SimpleURISpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1)), - value_for<n::on_use>(std::tr1::bind(&use_handler<SimpleURISpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(&do_nothing) + n::on_all() = std::tr1::bind(&any_all_handler<SimpleURISpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1), + n::on_any() = std::tr1::bind(&any_not_allowed_handler, s), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&labels_not_allowed_handler, s, _1), + n::on_pop() = std::tr1::bind(&pop_handler<SimpleURISpecTree>, std::tr1::ref(stack), + ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<SimpleURISpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&simple_uri_handler<SimpleURISpecTree>, std::tr1::ref(stack), + ParseStackTypes<SimpleURISpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1), + n::on_use() = std::tr1::bind(&use_handler<SimpleURISpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = &do_nothing )); parse_elike_dependencies(s, callbacks); @@ -489,27 +489,27 @@ paludis::erepository::parse_license(const std::string & s, std::tr1::shared_ptr<DepSpec> thing_to_annotate(spec); std::tr1::shared_ptr<LicenseSpecTree> top(make_shared_ptr(new LicenseSpecTree(spec))); stack.push_front(make_named_values<ParseStackTypes<LicenseSpecTree>::Item>( - value_for<n::item>(top->root()), - value_for<n::spec>(spec) + n::item() = top->root(), + n::spec() = spec )); ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<LicenseSpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1)), - value_for<n::on_any>(std::tr1::bind(&any_all_handler<LicenseSpecTree, AnyDepSpec>, std::tr1::ref(stack))), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&labels_not_allowed_handler, s, _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<LicenseSpecTree>, std::tr1::ref(stack), - ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<LicenseSpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&license_handler<LicenseSpecTree>, std::tr1::ref(stack), - ParseStackTypes<LicenseSpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1)), - value_for<n::on_use>(std::tr1::bind(&use_handler<LicenseSpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(std::tr1::bind(&use_under_any_handler, s, eapi)) + n::on_all() = std::tr1::bind(&any_all_handler<LicenseSpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1), + n::on_any() = std::tr1::bind(&any_all_handler<LicenseSpecTree, AnyDepSpec>, std::tr1::ref(stack)), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&labels_not_allowed_handler, s, _1), + n::on_pop() = std::tr1::bind(&pop_handler<LicenseSpecTree>, std::tr1::ref(stack), + ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<LicenseSpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&license_handler<LicenseSpecTree>, std::tr1::ref(stack), + ParseStackTypes<LicenseSpecTree>::AnnotationsGoHere(std::tr1::bind( + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1), + n::on_use() = std::tr1::bind(&use_handler<LicenseSpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = std::tr1::bind(&use_under_any_handler, s, eapi) )); parse_elike_dependencies(s, callbacks); @@ -528,27 +528,27 @@ paludis::erepository::parse_plain_text(const std::string & s, std::tr1::shared_ptr<DepSpec> thing_to_annotate(spec); std::tr1::shared_ptr<PlainTextSpecTree> top(make_shared_ptr(new PlainTextSpecTree(spec))); stack.push_front(make_named_values<ParseStackTypes<PlainTextSpecTree>::Item>( - value_for<n::item>(top->root()), - value_for<n::spec>(spec) + n::item() = top->root(), + n::spec() = spec )); ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<PlainTextSpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1)), - value_for<n::on_any>(std::tr1::bind(&any_not_allowed_handler, s)), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&labels_not_allowed_handler, s, _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<PlainTextSpecTree>, std::tr1::ref(stack), + n::on_all() = std::tr1::bind(&any_all_handler<PlainTextSpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1), + n::on_any() = std::tr1::bind(&any_not_allowed_handler, s), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&labels_not_allowed_handler, s, _1), + n::on_pop() = std::tr1::bind(&pop_handler<PlainTextSpecTree>, std::tr1::ref(stack), ParseStackTypes<PlainTextSpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<PlainTextSpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&plain_text_handler<PlainTextSpecTree>, std::tr1::ref(stack), + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<PlainTextSpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&plain_text_handler<PlainTextSpecTree>, std::tr1::ref(stack), ParseStackTypes<PlainTextSpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1)), - value_for<n::on_use>(std::tr1::bind(&use_handler<PlainTextSpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(&do_nothing) + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1), + n::on_use() = std::tr1::bind(&use_handler<PlainTextSpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = &do_nothing )); parse_elike_dependencies(s, callbacks); @@ -567,29 +567,29 @@ paludis::erepository::parse_myoptions(const std::string & s, std::tr1::shared_ptr<DepSpec> thing_to_annotate(spec); std::tr1::shared_ptr<PlainTextSpecTree> top(make_shared_ptr(new PlainTextSpecTree(spec))); stack.push_front(make_named_values<ParseStackTypes<PlainTextSpecTree>::Item>( - value_for<n::item>(top->root()), - value_for<n::spec>(spec) + n::item() = top->root(), + n::spec() = spec )); ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<PlainTextSpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1)), - value_for<n::on_any>(std::tr1::bind(&any_not_allowed_handler, s)), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&plain_text_label_handler<PlainTextSpecTree>, std::tr1::ref(stack), + n::on_all() = std::tr1::bind(&any_all_handler<PlainTextSpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = std::tr1::bind(&set_annotations, std::tr1::ref(thing_to_annotate), _1), + n::on_any() = std::tr1::bind(&any_not_allowed_handler, s), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&plain_text_label_handler<PlainTextSpecTree>, std::tr1::ref(stack), ParseStackTypes<PlainTextSpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<PlainTextSpecTree>, std::tr1::ref(stack), + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1), + n::on_pop() = std::tr1::bind(&pop_handler<PlainTextSpecTree>, std::tr1::ref(stack), ParseStackTypes<PlainTextSpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<PlainTextSpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&plain_text_handler<PlainTextSpecTree>, std::tr1::ref(stack), + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<PlainTextSpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&plain_text_handler<PlainTextSpecTree>, std::tr1::ref(stack), ParseStackTypes<PlainTextSpecTree>::AnnotationsGoHere(std::tr1::bind( - &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1)), - value_for<n::on_use>(std::tr1::bind(&use_handler<PlainTextSpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(&do_nothing) + &set_thing_to_annotate, std::tr1::ref(thing_to_annotate), _1)), _1), + n::on_use() = std::tr1::bind(&use_handler<PlainTextSpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = &do_nothing )); parse_elike_dependencies(s, callbacks); diff --git a/paludis/repositories/e/dep_parser_TEST.cc b/paludis/repositories/e/dep_parser_TEST.cc index b0a9040ba..483d4628c 100644 --- a/paludis/repositories/e/dep_parser_TEST.cc +++ b/paludis/repositories/e/dep_parser_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010 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 @@ -53,8 +53,8 @@ namespace test_cases { TestEnvironment env; std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -79,8 +79,8 @@ namespace test_cases { TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -105,8 +105,8 @@ namespace test_cases { TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -132,8 +132,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -168,8 +168,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -190,8 +190,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -212,8 +212,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -246,8 +246,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -272,8 +272,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -297,8 +297,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -318,8 +318,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -350,8 +350,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -383,8 +383,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -438,8 +438,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -462,8 +462,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -485,8 +485,8 @@ namespace test_cases { TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); diff --git a/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc b/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc index 9a33fb667..679a01037 100644 --- a/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc +++ b/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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,8 +44,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); @@ -86,8 +86,8 @@ namespace test_cases StringifyFormatter ff; TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); diff --git a/paludis/repositories/e/depend_rdepend_TEST.cc b/paludis/repositories/e/depend_rdepend_TEST.cc index 0b088113b..5646c03e9 100644 --- a/paludis/repositories/e/depend_rdepend_TEST.cc +++ b/paludis/repositories/e/depend_rdepend_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2009 Ciaran McCreesh + * Copyright (c) 2009, 2010 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 @@ -147,11 +147,11 @@ namespace #endif InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(v_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = v_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); StringifyFormatter f; diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc index d5cc7eb4c..1135ce3c3 100644 --- a/paludis/repositories/e/e_choices_key.cc +++ b/paludis/repositories/e/e_choices_key.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -227,8 +227,8 @@ namespace paludis { namespace n { - struct default_value; - struct implicit; + typedef Name<struct default_value_name> default_value; + typedef Name<struct implicit_name> implicit; } } @@ -295,13 +295,13 @@ EChoicesKey::populate_myoptions() const Context local_context("When using raw_myoptions_key to populate choices:"); std::tr1::shared_ptr<Choice> options(new Choice(make_named_values<ChoiceParams>( - value_for<n::consider_added_or_changed>(true), - value_for<n::contains_every_value>(false), - value_for<n::hidden>(false), - value_for<n::human_name>(_imp->id->eapi()->supported()->ebuild_environment_variables()->env_use()), - value_for<n::prefix>(ChoicePrefixName("")), - value_for<n::raw_name>(_imp->id->eapi()->supported()->ebuild_environment_variables()->env_use()), - value_for<n::show_with_no_prefix>(true) + n::consider_added_or_changed() = true, + n::contains_every_value() = false, + n::hidden() = false, + n::human_name() = _imp->id->eapi()->supported()->ebuild_environment_variables()->env_use(), + n::prefix() = ChoicePrefixName(""), + n::raw_name() = _imp->id->eapi()->supported()->ebuild_environment_variables()->env_use(), + n::show_with_no_prefix() = true ))); _imp->value->add(options); @@ -323,13 +323,13 @@ EChoicesKey::populate_myoptions() const std::string lower_u; std::transform(u->begin(), u->end(), std::back_inserter(lower_u), &::tolower); std::tr1::shared_ptr<Choice> exp(new Choice(make_named_values<ChoiceParams>( - value_for<n::consider_added_or_changed>(true), - value_for<n::contains_every_value>(false), - value_for<n::hidden>(hidden ? hidden->end() != hidden->find(*u) : false), - value_for<n::human_name>(lower_u), - value_for<n::prefix>(ChoicePrefixName(lower_u)), - value_for<n::raw_name>(stringify(*u)), - value_for<n::show_with_no_prefix>(false) + n::consider_added_or_changed() = true, + n::contains_every_value() = false, + n::hidden() = hidden ? hidden->end() != hidden->find(*u) : false, + n::human_name() = lower_u, + n::prefix() = ChoicePrefixName(lower_u), + n::raw_name() = stringify(*u), + n::show_with_no_prefix() = false ))); _imp->value->add(exp); @@ -369,13 +369,13 @@ EChoicesKey::populate_iuse() const Context local_context("When using raw_iuse_key and raw_use_key to populate choices:"); std::tr1::shared_ptr<Choice> use(new Choice(make_named_values<ChoiceParams>( - value_for<n::consider_added_or_changed>(true), - value_for<n::contains_every_value>(false), - value_for<n::hidden>(false), - value_for<n::human_name>(_imp->id->eapi()->supported()->ebuild_environment_variables()->env_use()), - value_for<n::prefix>(ChoicePrefixName("")), - value_for<n::raw_name>(_imp->id->eapi()->supported()->ebuild_environment_variables()->env_use()), - value_for<n::show_with_no_prefix>(true) + n::consider_added_or_changed() = true, + n::contains_every_value() = false, + n::hidden() = false, + n::human_name() = _imp->id->eapi()->supported()->ebuild_environment_variables()->env_use(), + n::prefix() = ChoicePrefixName(""), + n::raw_name() = _imp->id->eapi()->supported()->ebuild_environment_variables()->env_use(), + n::show_with_no_prefix() = true ))); _imp->value->add(use); @@ -412,8 +412,8 @@ EChoicesKey::populate_iuse() const { std::pair<ChoiceNameWithPrefix, Tribool> flag(parse_iuse(_imp->id->eapi(), u->first)); std::pair<ChoiceNameWithPrefix, ChoiceOptions> flag_with_options(flag.first, make_named_values<ChoiceOptions>( - value_for<n::default_value>(flag.second), - value_for<n::implicit>(u->second) + n::default_value() = flag.second, + n::implicit() = u->second )); iuse_sanitised.insert(stringify(flag.first)); @@ -477,13 +477,13 @@ EChoicesKey::populate_iuse() const if ((! env_arch.empty()) && _imp->maybe_e_repository && ! _imp->id->eapi()->supported()->ebuild_options()->require_use_expand_in_iuse()) { std::tr1::shared_ptr<Choice> arch(new Choice(make_named_values<ChoiceParams>( - value_for<n::consider_added_or_changed>(false), - value_for<n::contains_every_value>(false), - value_for<n::hidden>(true), - value_for<n::human_name>(env_arch), - value_for<n::prefix>(ChoicePrefixName("")), - value_for<n::raw_name>(env_arch), - value_for<n::show_with_no_prefix>(false) + n::consider_added_or_changed() = false, + n::contains_every_value() = false, + n::hidden() = true, + n::human_name() = env_arch, + n::prefix() = ChoicePrefixName(""), + n::raw_name() = env_arch, + n::show_with_no_prefix() = false ))); _imp->value->add(arch); @@ -501,13 +501,13 @@ EChoicesKey::populate_iuse() const std::string lower_u; std::transform(u->begin(), u->end(), std::back_inserter(lower_u), &::tolower); std::tr1::shared_ptr<Choice> exp(new Choice(make_named_values<ChoiceParams>( - value_for<n::consider_added_or_changed>(true), - value_for<n::contains_every_value>(! _imp->id->eapi()->supported()->ebuild_options()->require_use_expand_in_iuse()), - value_for<n::hidden>(hidden ? hidden->end() != hidden->find(*u) : false), - value_for<n::human_name>(lower_u), - value_for<n::prefix>(ChoicePrefixName(lower_u)), - value_for<n::raw_name>(stringify(*u)), - value_for<n::show_with_no_prefix>(false) + n::consider_added_or_changed() = true, + n::contains_every_value() = ! _imp->id->eapi()->supported()->ebuild_options()->require_use_expand_in_iuse(), + n::hidden() = hidden ? hidden->end() != hidden->find(*u) : false, + n::human_name() = lower_u, + n::prefix() = ChoicePrefixName(lower_u), + n::raw_name() = stringify(*u), + n::show_with_no_prefix() = false ))); _imp->value->add(exp); diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc index d2438afd0..33f162df4 100644 --- a/paludis/repositories/e/e_installed_repository.cc +++ b/paludis/repositories/e/e_installed_repository.cc @@ -159,7 +159,7 @@ EInstalledRepository::perform_hook(const Hook & hook) if (hook.name() == "sync_all_post") perform_updates(); - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } const bool @@ -237,28 +237,28 @@ EInstalledRepository::perform_config( phase != phase_end ; ++phase) { EbuildConfigCommand config_cmd(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(ver_dir), - value_for<n::ebuild_dir>(ver_dir), - value_for<n::ebuild_file>(ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild")), - value_for<n::eclassdirs>(eclassdirs), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)), - value_for<n::files_dir>(ver_dir), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-config")), - value_for<n::package_id>(id), - value_for<n::portdir>(ver_dir), - value_for<n::root>(stringify(_imp->params.root())), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv")) + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = ver_dir, + n::ebuild_dir() = ver_dir, + n::ebuild_file() = ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild"), + n::eclassdirs() = eclassdirs, + n::environment() = _imp->params.environment(), + n::exlibsdirs() = make_shared_ptr(new FSEntrySequence), + n::files_dir() = ver_dir, + n::maybe_output_manager() = output_manager, + n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-config"), + n::package_id() = id, + n::portdir() = ver_dir, + n::root() = stringify(_imp->params.root()), + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") ), make_named_values<EbuildConfigCommandParams>( - value_for<n::load_environment>(load_env.get()) + n::load_environment() = load_env.get() )); config_cmd(); @@ -346,36 +346,36 @@ EInstalledRepository::perform_info( } EbuildInfoCommand info_cmd(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(ver_dir), - value_for<n::ebuild_dir>(ver_dir), - value_for<n::ebuild_file>(ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild")), - value_for<n::eclassdirs>(eclassdirs), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)), - value_for<n::files_dir>(ver_dir), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-info")), - value_for<n::package_id>(id), - value_for<n::portdir>(ver_dir), - value_for<n::root>(stringify(_imp->params.root())), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv")) + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = ver_dir, + n::ebuild_dir() = ver_dir, + n::ebuild_file() = ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild"), + n::eclassdirs() = eclassdirs, + n::environment() = _imp->params.environment(), + n::exlibsdirs() = make_shared_ptr(new FSEntrySequence), + n::files_dir() = ver_dir, + n::maybe_output_manager() = output_manager, + n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-info"), + n::package_id() = id, + n::portdir() = ver_dir, + n::root() = stringify(_imp->params.root()), + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") ), make_named_values<EbuildInfoCommandParams>( - value_for<n::expand_vars>(make_shared_ptr(new Map<std::string, std::string>)), - value_for<n::info_vars>(i ? i : make_shared_ptr(new const Set<std::string>)), - value_for<n::load_environment>(load_env.get()), - value_for<n::profiles>(make_shared_ptr(new FSEntrySequence)), - value_for<n::profiles_with_parents>(make_shared_ptr(new FSEntrySequence)), - value_for<n::use>(""), - value_for<n::use_ebuild_file>(false), - value_for<n::use_expand>(""), - value_for<n::use_expand_hidden>("") + n::expand_vars() = make_shared_ptr(new Map<std::string, std::string>), + n::info_vars() = i ? i : make_shared_ptr(new const Set<std::string>), + n::load_environment() = load_env.get(), + n::profiles() = make_shared_ptr(new FSEntrySequence), + n::profiles_with_parents() = make_shared_ptr(new FSEntrySequence), + n::use() = "", + n::use_ebuild_file() = false, + n::use_expand() = "", + n::use_expand_hidden() = "" )); info_cmd(); diff --git a/paludis/repositories/e/e_installed_repository.hh b/paludis/repositories/e/e_installed_repository.hh index 9c6d9dba7..e55a1fa88 100644 --- a/paludis/repositories/e/e_installed_repository.hh +++ b/paludis/repositories/e/e_installed_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -27,9 +27,9 @@ namespace paludis { namespace n { - struct builddir; - struct environment; - struct root; + typedef Name<struct builddir_name> builddir; + typedef Name<struct environment_name> environment; + typedef Name<struct root_name> root; } namespace erepository diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc index db854f0a3..80513a436 100644 --- a/paludis/repositories/e/e_installed_repository_id.cc +++ b/paludis/repositories/e/e_installed_repository_id.cc @@ -1038,13 +1038,13 @@ EInstalledRepositoryID::add_build_options(const std::tr1::shared_ptr<Choices> & if (eapi()->supported()) { std::tr1::shared_ptr<Choice> build_options(new Choice(make_named_values<ChoiceParams>( - value_for<n::consider_added_or_changed>(false), - value_for<n::contains_every_value>(false), - value_for<n::hidden>(false), - value_for<n::human_name>(canonical_build_options_human_name()), - value_for<n::prefix>(canonical_build_options_prefix()), - value_for<n::raw_name>(canonical_build_options_raw_name()), - value_for<n::show_with_no_prefix>(false) + n::consider_added_or_changed() = false, + n::contains_every_value() = false, + n::hidden() = false, + n::human_name() = canonical_build_options_human_name(), + n::prefix() = canonical_build_options_prefix(), + n::raw_name() = canonical_build_options_raw_name(), + n::show_with_no_prefix() = false ))); choices->add(build_options); diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc index 19fdf2b88..f0e90ffa1 100644 --- a/paludis/repositories/e/e_repository.cc +++ b/paludis/repositories/e/e_repository.cc @@ -496,12 +496,12 @@ ERepository::ERepository(const ERepositoryParams & p) : p.environment(), fetch_repo_name(p.location()), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(p.binary_destination() ? this : 0), - value_for<n::environment_variable_interface>(this), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(this), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>((*DistributionData::get_instance()->distribution_from_string(p.environment()->distribution())).support_old_style_virtuals() ? this : 0) + n::destination_interface() = p.binary_destination() ? this : 0, + n::environment_variable_interface() = this, + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = this, + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = (*DistributionData::get_instance()->distribution_from_string(p.environment()->distribution())).support_old_style_virtuals() ? this : 0 )), PrivateImplementationPattern<ERepository>(new Implementation<ERepository>(this, p)), _imp(PrivateImplementationPattern<ERepository>::_imp) @@ -749,14 +749,14 @@ ERepository::sync(const std::tr1::shared_ptr<OutputManager> & output_manager) co s_end(sync_list.end()) ; s != s_end ; ++s) { DefaultSyncer syncer(make_named_values<SyncerParams>( - value_for<n::environment>(_imp->params.environment()), - value_for<n::local>(stringify(_imp->params.location())), - value_for<n::remote>(*s) + n::environment() = _imp->params.environment(), + n::local() = stringify(_imp->params.location()), + n::remote() = *s )); SyncOptions opts(make_named_values<SyncOptions>( - value_for<n::filter_file>(_imp->layout->sync_filter_file()), - value_for<n::options>(_imp->params.sync_options()), - value_for<n::output_manager>(output_manager) + n::filter_file() = _imp->layout->sync_filter_file(), + n::options() = _imp->params.sync_options(), + n::output_manager() = output_manager )); try { @@ -926,8 +926,8 @@ ERepository::virtual_packages() const for (Map<QualifiedPackageName, PackageDepSpec>::ConstIterator i(_imp->profile_ptr->virtuals()->begin()), i_end(_imp->profile_ptr->virtuals()->end()) ; i != i_end ; ++i) result->push_back(make_named_values<RepositoryVirtualsEntry>( - value_for<n::provided_by_spec>(make_shared_copy(i->second)), - value_for<n::virtual_name>(i->first) + n::provided_by_spec() = make_shared_copy(i->second), + n::virtual_name() = i->first )); return result; @@ -990,7 +990,7 @@ ERepository::perform_hook(const Hook & hook) || hook.name() == "uninstall_all_post") update_news(); - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } std::tr1::shared_ptr<const CategoryNamePartSet> @@ -1499,37 +1499,37 @@ ERepository::repository_factory_create( } return std::tr1::shared_ptr<ERepository>(new ERepository(make_named_values<ERepositoryParams>( - value_for<n::append_repository_name_to_write_cache>(append_repository_name_to_write_cache), - value_for<n::auto_profiles>(auto_profiles), - value_for<n::binary_destination>(binary_destination), - value_for<n::binary_distdir>(binary_distdir), - value_for<n::binary_keywords>(binary_keywords), - value_for<n::binary_uri_prefix>(binary_uri_prefix), - value_for<n::builddir>(FSEntry(builddir).realpath_if_exists()), - value_for<n::cache>(cache), - value_for<n::distdir>(FSEntry(distdir).realpath_if_exists()), - value_for<n::eapi_when_unknown>(eapi_when_unknown), - value_for<n::eapi_when_unspecified>(eapi_when_unspecified), - value_for<n::eclassdirs>(eclassdirs), - value_for<n::entry_format>("ebuild"), - value_for<n::environment>(env), - value_for<n::ignore_deprecated_profiles>(ignore_deprecated_profiles), - value_for<n::layout>(layout), - value_for<n::location>(FSEntry(location).realpath_if_exists()), - value_for<n::master_repositories>(master_repositories), - value_for<n::names_cache>(FSEntry(names_cache).realpath_if_exists()), - value_for<n::newsdir>(FSEntry(newsdir).realpath_if_exists()), - value_for<n::profile_eapi_when_unspecified>(profile_eapi), - value_for<n::profile_layout>(profile_layout), - value_for<n::profiles>(profiles), - value_for<n::profiles_explicitly_set>(profiles_explicitly_set), - value_for<n::securitydir>(FSEntry(securitydir).realpath_if_exists()), - value_for<n::setsdir>(FSEntry(setsdir).realpath_if_exists()), - value_for<n::sync>(sync), - value_for<n::sync_options>(sync_options), - value_for<n::use_manifest>(use_manifest), - value_for<n::write_bin_uri_prefix>(""), - value_for<n::write_cache>(FSEntry(write_cache).realpath_if_exists()) + n::append_repository_name_to_write_cache() = append_repository_name_to_write_cache, + n::auto_profiles() = auto_profiles, + n::binary_destination() = binary_destination, + n::binary_distdir() = binary_distdir, + n::binary_keywords() = binary_keywords, + n::binary_uri_prefix() = binary_uri_prefix, + n::builddir() = FSEntry(builddir).realpath_if_exists(), + n::cache() = cache, + n::distdir() = FSEntry(distdir).realpath_if_exists(), + n::eapi_when_unknown() = eapi_when_unknown, + n::eapi_when_unspecified() = eapi_when_unspecified, + n::eclassdirs() = eclassdirs, + n::entry_format() = "ebuild", + n::environment() = env, + n::ignore_deprecated_profiles() = ignore_deprecated_profiles, + n::layout() = layout, + n::location() = FSEntry(location).realpath_if_exists(), + n::master_repositories() = master_repositories, + n::names_cache() = FSEntry(names_cache).realpath_if_exists(), + n::newsdir() = FSEntry(newsdir).realpath_if_exists(), + n::profile_eapi_when_unspecified() = profile_eapi, + n::profile_layout() = profile_layout, + n::profiles() = profiles, + n::profiles_explicitly_set() = profiles_explicitly_set, + n::securitydir() = FSEntry(securitydir).realpath_if_exists(), + n::setsdir() = FSEntry(setsdir).realpath_if_exists(), + n::sync() = sync, + n::sync_options() = sync_options, + n::use_manifest() = use_manifest, + n::write_bin_uri_prefix() = "", + n::write_cache() = FSEntry(write_cache).realpath_if_exists() ))); } @@ -2080,41 +2080,40 @@ ERepository::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id, continue; EbuildCommandParams command_params(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(_imp->params.distdir()), - value_for<n::ebuild_dir>(layout()->package_directory(id->name())), - value_for<n::ebuild_file>(id->fs_location_key()->value()), - value_for<n::eclassdirs>(_imp->params.eclassdirs()), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(exlibsdirs), - value_for<n::files_dir>(layout()->package_directory(id->name()) / "files"), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(package_builddir), - value_for<n::package_id>(id), - value_for<n::portdir>( + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = _imp->params.distdir(), + n::ebuild_dir() = layout()->package_directory(id->name()), + n::ebuild_file() = id->fs_location_key()->value(), + n::eclassdirs() = _imp->params.eclassdirs(), + n::environment() = _imp->params.environment(), + n::exlibsdirs() = exlibsdirs, + n::files_dir() = layout()->package_directory(id->name()) / "files", + n::maybe_output_manager() = output_manager, + n::package_builddir() = package_builddir, + n::package_id() = id, + n::portdir() = (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ? - (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()), - value_for<n::root>("/"), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok) + (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location(), + n::root() = "/", + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") && userpriv_ok )); - EbuildFetchExtraCommand fetch_extra_cmd(command_params, - make_named_values<EbuildFetchExtraCommandParams>( - value_for<n::a>(archives), - value_for<n::aa>(all_archives), - value_for<n::expand_vars>(expand_vars), - value_for<n::loadsaveenv_dir>(package_builddir / "temp"), - value_for<n::profiles>(_imp->params.profiles()), - value_for<n::profiles_with_parents>(profile()->profiles_with_parents()), - value_for<n::slot>(id->slot_key() ? stringify(id->slot_key()->value()) : ""), - value_for<n::use>(use), - value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")), - value_for<n::use_expand_hidden>(join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ")) - )); + EbuildFetchExtraCommand fetch_extra_cmd(command_params, make_named_values<EbuildFetchExtraCommandParams>( + n::a() = archives, + n::aa() = all_archives, + n::expand_vars() = expand_vars, + n::loadsaveenv_dir() = package_builddir / "temp", + n::profiles() = _imp->params.profiles(), + n::profiles_with_parents() = profile()->profiles_with_parents(), + n::slot() = id->slot_key() ? stringify(id->slot_key()->value()) : "", + n::use() = use, + n::use_expand() = join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " "), + n::use_expand_hidden() = join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ") + )); if (! fetch_extra_cmd()) throw ActionFailedError("Fetch of '" + stringify(*id) + "' failed"); @@ -2128,38 +2127,37 @@ ERepository::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id, phase != phase_end ; ++phase) { EbuildCommandParams command_params(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(_imp->params.distdir()), - value_for<n::ebuild_dir>(layout()->package_directory(id->name())), - value_for<n::ebuild_file>(id->fs_location_key()->value()), - value_for<n::eclassdirs>(_imp->params.eclassdirs()), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(exlibsdirs), - value_for<n::files_dir>(layout()->package_directory(id->name()) / "files"), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-nofetch")), - value_for<n::package_id>(id), - value_for<n::portdir>( - (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ? - (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()), - value_for<n::root>("/"), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok) + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = _imp->params.distdir(), + n::ebuild_dir() = layout()->package_directory(id->name()), + n::ebuild_file() = id->fs_location_key()->value(), + n::eclassdirs() = _imp->params.eclassdirs(), + n::environment() = _imp->params.environment(), + n::exlibsdirs() = exlibsdirs, + n::files_dir() = layout()->package_directory(id->name()) / "files", + n::maybe_output_manager() = output_manager, + n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-nofetch"), + n::package_id() = id, + n::portdir() = (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ? + (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location(), + n::root() = "/", + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") && userpriv_ok )); EbuildNoFetchCommand nofetch_cmd(command_params, make_named_values<EbuildNoFetchCommandParams>( - value_for<n::a>(archives), - value_for<n::aa>(all_archives), - value_for<n::expand_vars>(expand_vars), - value_for<n::profiles>(_imp->params.profiles()), - value_for<n::profiles_with_parents>(profile()->profiles_with_parents()), - value_for<n::use>(use), - value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")), - value_for<n::use_expand_hidden>(join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ")) + n::a() = archives, + n::aa() = all_archives, + n::expand_vars() = expand_vars, + n::profiles() = _imp->params.profiles(), + n::profiles_with_parents() = profile()->profiles_with_parents(), + n::use() = use, + n::use_expand() = join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " "), + n::use_expand_hidden() = join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ") )); if (! nofetch_cmd()) @@ -2397,16 +2395,16 @@ ERepository::install(const std::tr1::shared_ptr<const ERepositoryID> & id, Timestamp build_start_time(FSEntry(package_builddir / "temp" / "build_start_time").mtim()); (*install_action.options.destination()).destination_interface()->merge( make_named_values<MergeParams>( - value_for<n::build_start_time>(build_start_time), - value_for<n::environment_file>(package_builddir / "temp" / "loadsaveenv"), - value_for<n::image_dir>(package_builddir / "image"), - value_for<n::merged_entries>(merged_entries), - value_for<n::options>(id->eapi()->supported()->merger_options() | extra_merger_options), - value_for<n::output_manager>(output_manager), - value_for<n::package_id>(id), - value_for<n::perform_uninstall>(install_action.options.perform_uninstall()), - value_for<n::used_this_for_config_protect>(std::tr1::bind( - &used_this_for_config_protect, std::tr1::ref(used_config_protect), std::tr1::placeholders::_1)) + n::build_start_time() = build_start_time, + n::environment_file() = package_builddir / "temp" / "loadsaveenv", + n::image_dir() = package_builddir / "image", + n::merged_entries() = merged_entries, + n::options() = id->eapi()->supported()->merger_options() | extra_merger_options, + n::output_manager() = output_manager, + n::package_id() = id, + n::perform_uninstall() = install_action.options.perform_uninstall(), + n::used_this_for_config_protect() = std::tr1::bind( + &used_this_for_config_protect, std::tr1::ref(used_config_protect), std::tr1::placeholders::_1) )); } else if (phase->option("strip")) @@ -2431,12 +2429,12 @@ ERepository::install(const std::tr1::shared_ptr<const ERepositoryID> & id, ELikeSplitChoiceValue::canonical_name_with_prefix())); EStripper stripper(make_named_values<EStripperOptions>( - value_for<n::debug_dir>(package_builddir / "image" / "usr" / libdir / "debug"), - value_for<n::image_dir>(package_builddir / "image"), - value_for<n::output_manager>(output_manager), - value_for<n::package_id>(id), - value_for<n::split>(split_choice && split_choice->enabled()), - value_for<n::strip>(strip_choice && strip_choice->enabled()) + n::debug_dir() = package_builddir / "image" / "usr" / libdir / "debug", + n::image_dir() = package_builddir / "image", + n::output_manager() = output_manager, + n::package_id() = id, + n::split() = split_choice && split_choice->enabled(), + n::strip() = strip_choice && strip_choice->enabled() )); stripper.strip(); } @@ -2474,45 +2472,45 @@ ERepository::install(const std::tr1::shared_ptr<const ERepositoryID> & id, } EbuildCommandParams command_params(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(_imp->params.distdir()), - value_for<n::ebuild_dir>(layout()->package_directory(id->name())), - value_for<n::ebuild_file>(id->fs_location_key()->value()), - value_for<n::eclassdirs>(_imp->params.eclassdirs()), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(exlibsdirs), - value_for<n::files_dir>(layout()->package_directory(id->name()) / "files"), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(package_builddir), - value_for<n::package_id>(id), - value_for<n::portdir>( + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = _imp->params.distdir(), + n::ebuild_dir() = layout()->package_directory(id->name()), + n::ebuild_file() = id->fs_location_key()->value(), + n::eclassdirs() = _imp->params.eclassdirs(), + n::environment() = _imp->params.environment(), + n::exlibsdirs() = exlibsdirs, + n::files_dir() = layout()->package_directory(id->name()) / "files", + n::maybe_output_manager() = output_manager, + n::package_builddir() = package_builddir, + n::package_id() = id, + n::portdir() = (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ? - (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()), - value_for<n::root>(install_action.options.destination()->installed_root_key() ? + (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location(), + n::root() = install_action.options.destination()->installed_root_key() ? stringify(install_action.options.destination()->installed_root_key()->value()) : - "/"), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok) + "/", + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") && userpriv_ok )); EbuildInstallCommandParams install_params( make_named_values<EbuildInstallCommandParams>( - value_for<n::a>(archives), - value_for<n::aa>(all_archives), - value_for<n::config_protect>(environment_updated_profile_variable("CONFIG_PROTECT")), - value_for<n::config_protect_mask>(environment_updated_profile_variable("CONFIG_PROTECT_MASK")), - value_for<n::expand_vars>(expand_vars), - value_for<n::loadsaveenv_dir>(package_builddir / "temp"), - value_for<n::profiles>(_imp->params.profiles()), - value_for<n::profiles_with_parents>(profile()->profiles_with_parents()), - value_for<n::replacing_ids>(install_action.options.replacing()), - value_for<n::slot>(id->slot_key() ? stringify(id->slot_key()->value()) : ""), - value_for<n::use>(use), - value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")), - value_for<n::use_expand_hidden>(join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ")) + n::a() = archives, + n::aa() = all_archives, + n::config_protect() = environment_updated_profile_variable("CONFIG_PROTECT"), + n::config_protect_mask() = environment_updated_profile_variable("CONFIG_PROTECT_MASK"), + n::expand_vars() = expand_vars, + n::loadsaveenv_dir() = package_builddir / "temp", + n::profiles() = _imp->params.profiles(), + n::profiles_with_parents() = profile()->profiles_with_parents(), + n::replacing_ids() = install_action.options.replacing(), + n::slot() = id->slot_key() ? stringify(id->slot_key()->value()) : "", + n::use() = use, + n::use_expand() = join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " "), + n::use_expand_hidden() = join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ") )); EbuildInstallCommand cmd(command_params, install_params); @@ -2532,12 +2530,12 @@ ERepository::install(const std::tr1::shared_ptr<const ERepositoryID> & id, continue; UninstallActionOptions uo(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(used_config_protect), - value_for<n::if_for_install_id>(id), - value_for<n::ignore_for_unmerge>(std::tr1::bind(&ignore_merged, merged_entries, - std::tr1::placeholders::_1)), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1)) + n::config_protect() = used_config_protect, + n::if_for_install_id() = id, + n::ignore_for_unmerge() = std::tr1::bind(&ignore_merged, merged_entries, + std::tr1::placeholders::_1), + n::is_overwrite() = false, + n::make_output_manager() = std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1) )); install_action.options.perform_uninstall()(*i, uo); } @@ -2588,40 +2586,40 @@ ERepository::info(const std::tr1::shared_ptr<const ERepositoryID> & id, continue; EbuildCommandParams command_params(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(_imp->params.distdir()), - value_for<n::ebuild_dir>(layout()->package_directory(id->name())), - value_for<n::ebuild_file>(id->fs_location_key()->value()), - value_for<n::eclassdirs>(_imp->params.eclassdirs()), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(exlibsdirs), - value_for<n::files_dir>(layout()->package_directory(id->name()) / "files"), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-info")), - value_for<n::package_id>(id), - value_for<n::portdir>( + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = _imp->params.distdir(), + n::ebuild_dir() = layout()->package_directory(id->name()), + n::ebuild_file() = id->fs_location_key()->value(), + n::eclassdirs() = _imp->params.eclassdirs(), + n::environment() = _imp->params.environment(), + n::exlibsdirs() = exlibsdirs, + n::files_dir() = layout()->package_directory(id->name()) / "files", + n::maybe_output_manager() = output_manager, + n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-info"), + n::package_id() = id, + n::portdir() = (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ? - (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()), - value_for<n::root>(stringify(_imp->params.environment()->root())), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok) + (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location(), + n::root() = stringify(_imp->params.environment()->root()), + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") && userpriv_ok )); EbuildInfoCommandParams info_params( make_named_values<EbuildInfoCommandParams>( - value_for<n::expand_vars>(expand_vars), - value_for<n::info_vars>(info_vars_key() ? - info_vars_key()->value() : make_shared_ptr(new const Set<std::string>)), - value_for<n::load_environment>(static_cast<const FSEntry *>(0)), - value_for<n::profiles>(_imp->params.profiles()), - value_for<n::profiles_with_parents>(profile()->profiles_with_parents()), - value_for<n::use>(use), - value_for<n::use_ebuild_file>(true), - value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")), - value_for<n::use_expand_hidden>(join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ")) + n::expand_vars() = expand_vars, + n::info_vars() = info_vars_key() ? + info_vars_key()->value() : make_shared_ptr(new const Set<std::string>), + n::load_environment() = static_cast<const FSEntry *>(0), + n::profiles() = _imp->params.profiles(), + n::profiles_with_parents() = profile()->profiles_with_parents(), + n::use() = use, + n::use_ebuild_file() = true, + n::use_expand() = join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " "), + n::use_expand_hidden() = join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ") )); EbuildInfoCommand cmd(command_params, info_params); @@ -2665,26 +2663,26 @@ ERepository::get_environment_variable( std::tr1::shared_ptr<const FSEntrySequence> exlibsdirs(layout()->exlibsdirs(id->name())); EbuildVariableCommand cmd(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phases.begin_phases()->option("clearenv")), - value_for<n::commands>(join(phases.begin_phases()->begin_commands(), phases.begin_phases()->end_commands(), " ")), - value_for<n::distdir>(_imp->params.distdir()), - value_for<n::ebuild_dir>(layout()->package_directory(id->name())), - value_for<n::ebuild_file>(id->fs_location_key()->value()), - value_for<n::eclassdirs>(_imp->params.eclassdirs()), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(exlibsdirs), - value_for<n::files_dir>(layout()->package_directory(id->name()) / "files"), - value_for<n::maybe_output_manager>(make_null_shared_ptr()), - value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-variable")), - value_for<n::package_id>(id), - value_for<n::portdir>( + n::builddir() = _imp->params.builddir(), + n::clearenv() = phases.begin_phases()->option("clearenv"), + n::commands() = join(phases.begin_phases()->begin_commands(), phases.begin_phases()->end_commands(), " "), + n::distdir() = _imp->params.distdir(), + n::ebuild_dir() = layout()->package_directory(id->name()), + n::ebuild_file() = id->fs_location_key()->value(), + n::eclassdirs() = _imp->params.eclassdirs(), + n::environment() = _imp->params.environment(), + n::exlibsdirs() = exlibsdirs, + n::files_dir() = layout()->package_directory(id->name()) / "files", + n::maybe_output_manager() = make_null_shared_ptr(), + n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-variable"), + n::package_id() = id, + n::portdir() = (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ? - (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()), - value_for<n::root>("/"), - value_for<n::sandbox>(phases.begin_phases()->option("sandbox")), - value_for<n::sydbox>(phases.begin_phases()->option("sydbox")), - value_for<n::userpriv>(phases.begin_phases()->option("userpriv") && userpriv_ok) + (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location(), + n::root() = "/", + n::sandbox() = phases.begin_phases()->option("sandbox"), + n::sydbox() = phases.begin_phases()->option("sydbox"), + n::userpriv() = phases.begin_phases()->option("userpriv") && userpriv_ok ), var); @@ -2714,16 +2712,16 @@ ERepository::merge(const MergeParams & m) WriteBinaryEbuildCommand write_binary_ebuild_command( make_named_values<WriteBinaryEbuildCommandParams>( - value_for<n::binary_distdir>(_imp->params.binary_distdir()), - value_for<n::binary_ebuild_location>(binary_ebuild_location), - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::destination_repository>(this), - value_for<n::environment>(_imp->params.environment()), - value_for<n::environment_file>(m.environment_file()), - value_for<n::image>(m.image_dir()), - value_for<n::maybe_output_manager>(m.output_manager()), - value_for<n::merger_options>(std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id())->eapi()->supported()->merger_options()), - value_for<n::package_id>(std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id())) + n::binary_distdir() = _imp->params.binary_distdir(), + n::binary_ebuild_location() = binary_ebuild_location, + n::builddir() = _imp->params.builddir(), + n::destination_repository() = this, + n::environment() = _imp->params.environment(), + n::environment_file() = m.environment_file(), + n::image() = m.image_dir(), + n::maybe_output_manager() = m.output_manager(), + n::merger_options() = std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id())->eapi()->supported()->merger_options(), + n::package_id() = std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id()) )); write_binary_ebuild_command(); @@ -2816,37 +2814,37 @@ ERepository::pretend( output_manager = a.options.make_output_manager()(a); EbuildCommandParams command_params(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(_imp->params.distdir()), - value_for<n::ebuild_dir>(layout()->package_directory(id->name())), - value_for<n::ebuild_file>(id->fs_location_key()->value()), - value_for<n::eclassdirs>(_imp->params.eclassdirs()), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(exlibsdirs), - value_for<n::files_dir>(layout()->package_directory(id->name()) / "files"), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-bad_options")), - value_for<n::package_id>(id), - value_for<n::portdir>( + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = _imp->params.distdir(), + n::ebuild_dir() = layout()->package_directory(id->name()), + n::ebuild_file() = id->fs_location_key()->value(), + n::eclassdirs() = _imp->params.eclassdirs(), + n::environment() = _imp->params.environment(), + n::exlibsdirs() = exlibsdirs, + n::files_dir() = layout()->package_directory(id->name()) / "files", + n::maybe_output_manager() = output_manager, + n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-bad_options"), + n::package_id() = id, + n::portdir() = (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ? - (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()), - value_for<n::root>(stringify(_imp->params.environment()->root())), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok) + (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location(), + n::root() = stringify(_imp->params.environment()->root()), + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") && userpriv_ok )); EbuildBadOptionsCommand bad_options_cmd(command_params, make_named_values<EbuildBadOptionsCommandParams>( - value_for<n::expand_vars>(expand_vars), - value_for<n::profiles>(_imp->params.profiles()), - value_for<n::profiles_with_parents>(profile()->profiles_with_parents()), - value_for<n::unmet_requirements>(verifier.unmet_requirements()), - value_for<n::use>(use), - value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")), - value_for<n::use_expand_hidden>(join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ")) + n::expand_vars() = expand_vars, + n::profiles() = _imp->params.profiles(), + n::profiles_with_parents() = profile()->profiles_with_parents(), + n::unmet_requirements() = verifier.unmet_requirements(), + n::use() = use, + n::use_expand() = join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " "), + n::use_expand_hidden() = join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ") )); if (! bad_options_cmd()) @@ -2871,36 +2869,36 @@ ERepository::pretend( output_manager = a.options.make_output_manager()(a); EbuildCommandParams command_params(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(_imp->params.distdir()), - value_for<n::ebuild_dir>(layout()->package_directory(id->name())), - value_for<n::ebuild_file>(id->fs_location_key()->value()), - value_for<n::eclassdirs>(_imp->params.eclassdirs()), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(exlibsdirs), - value_for<n::files_dir>(layout()->package_directory(id->name()) / "files"), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-pretend")), - value_for<n::package_id>(id), - value_for<n::portdir>( + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = _imp->params.distdir(), + n::ebuild_dir() = layout()->package_directory(id->name()), + n::ebuild_file() = id->fs_location_key()->value(), + n::eclassdirs() = _imp->params.eclassdirs(), + n::environment() = _imp->params.environment(), + n::exlibsdirs() = exlibsdirs, + n::files_dir() = layout()->package_directory(id->name()) / "files", + n::maybe_output_manager() = output_manager, + n::package_builddir() = _imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-pretend"), + n::package_id() = id, + n::portdir() = (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ? - (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()), - value_for<n::root>(stringify(_imp->params.environment()->root())), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok) + (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location(), + n::root() = stringify(_imp->params.environment()->root()), + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") && userpriv_ok )); EbuildPretendCommand pretend_cmd(command_params, make_named_values<EbuildPretendCommandParams>( - value_for<n::expand_vars>(expand_vars), - value_for<n::profiles>(_imp->params.profiles()), - value_for<n::profiles_with_parents>(profile()->profiles_with_parents()), - value_for<n::use>(use), - value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")), - value_for<n::use_expand_hidden>(join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ")) + n::expand_vars() = expand_vars, + n::profiles() = _imp->params.profiles(), + n::profiles_with_parents() = profile()->profiles_with_parents(), + n::use() = use, + n::use_expand() = join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " "), + n::use_expand_hidden() = join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " ") )); if (! pretend_cmd()) diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc index 7c9243286..dfe9fd3f9 100644 --- a/paludis/repositories/e/e_repository_TEST.cc +++ b/paludis/repositories/e/e_repository_TEST.cc @@ -936,14 +936,14 @@ namespace test_cases env.package_database()->add_repository(1, repo); FetchAction action(make_named_values<FetchActionOptions>( - value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)), - value_for<n::exclude_unmirrorable>(false), - value_for<n::fetch_parts>(FetchParts() + fp_regulars + fp_extras), - value_for<n::ignore_not_in_manifest>(false), - value_for<n::ignore_unfetched>(false), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::safe_resume>(true), - value_for<n::want_phase>(std::tr1::bind(return_literal_function(wp_yes))) + n::errors() = make_shared_ptr(new Sequence<FetchActionFailure>), + n::exclude_unmirrorable() = false, + n::fetch_parts() = FetchParts() + fp_regulars + fp_extras, + n::ignore_not_in_manifest() = false, + n::ignore_unfetched() = false, + n::make_output_manager() = &make_standard_output_manager, + n::safe_resume() = true, + n::want_phase() = std::tr1::bind(return_literal_function(wp_yes)) )); { @@ -1045,14 +1045,14 @@ namespace test_cases env.package_database()->add_repository(1, repo); FetchAction action(make_named_values<FetchActionOptions>( - value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)), - value_for<n::exclude_unmirrorable>(false), - value_for<n::fetch_parts>(FetchParts() + fp_regulars + fp_extras), - value_for<n::ignore_not_in_manifest>(false), - value_for<n::ignore_unfetched>(false), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::safe_resume>(true), - value_for<n::want_phase>(std::tr1::bind(return_literal_function(wp_yes))) + n::errors() = make_shared_ptr(new Sequence<FetchActionFailure>), + n::exclude_unmirrorable() = false, + n::fetch_parts() = FetchParts() + fp_regulars + fp_extras, + n::ignore_not_in_manifest() = false, + n::ignore_unfetched() = false, + n::make_output_manager() = &make_standard_output_manager, + n::safe_resume() = true, + n::want_phase() = std::tr1::bind(return_literal_function(wp_yes)) )); const std::tr1::shared_ptr<const PackageID> id(*env[selection::AllVersionsSorted(generator::Matches( diff --git a/paludis/repositories/e/e_repository_TEST_0.cc b/paludis/repositories/e/e_repository_TEST_0.cc index 1d2dccaf6..748855142 100644 --- a/paludis/repositories/e/e_repository_TEST_0.cc +++ b/paludis/repositories/e/e_repository_TEST_0.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -129,10 +129,10 @@ namespace test_cases std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); installed_repo->add_version("cat", "pretend-installed", "0")->provide_key()->set_from_string("virtual/virtual-pretend-installed"); installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed"); @@ -151,11 +151,11 @@ namespace test_cases #endif InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); #ifdef ENABLE_VIRTUALS_REPOSITORY diff --git a/paludis/repositories/e/e_repository_TEST_1.cc b/paludis/repositories/e/e_repository_TEST_1.cc index e0cfe54a7..ac6f55826 100644 --- a/paludis/repositories/e/e_repository_TEST_1.cc +++ b/paludis/repositories/e/e_repository_TEST_1.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -122,19 +122,19 @@ namespace test_cases std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); env.package_database()->add_repository(2, installed_repo); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); { diff --git a/paludis/repositories/e/e_repository_TEST_2.cc b/paludis/repositories/e/e_repository_TEST_2.cc index d3c1cfcc2..376c82488 100644 --- a/paludis/repositories/e/e_repository_TEST_2.cc +++ b/paludis/repositories/e/e_repository_TEST_2.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -122,19 +122,19 @@ namespace test_cases std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); env.package_database()->add_repository(2, installed_repo); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); { diff --git a/paludis/repositories/e/e_repository_TEST_3.cc b/paludis/repositories/e/e_repository_TEST_3.cc index fd35af17a..6ee3c7482 100644 --- a/paludis/repositories/e/e_repository_TEST_3.cc +++ b/paludis/repositories/e/e_repository_TEST_3.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -122,19 +122,19 @@ namespace test_cases std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); env.package_database()->add_repository(2, installed_repo); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); { diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc index 5f047fd12..d287f0657 100644 --- a/paludis/repositories/e/e_repository_TEST_4.cc +++ b/paludis/repositories/e/e_repository_TEST_4.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -122,23 +122,23 @@ namespace test_cases std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); env.package_database()->add_repository(2, installed_repo); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); PretendAction pretend_action(make_named_values<PretendActionOptions>( - value_for<n::make_output_manager>(&make_standard_output_manager) + n::make_output_manager() = &make_standard_output_manager )); { diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc index 784157a85..ce53be6c4 100644 --- a/paludis/repositories/e/e_repository_TEST_ever.cc +++ b/paludis/repositories/e/e_repository_TEST_ever.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -130,10 +130,10 @@ namespace std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); installed_repo->add_version("cat", "pretend-installed", "0")->provide_key()->set_from_string("virtual/virtual-pretend-installed"); installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed"); @@ -152,11 +152,11 @@ namespace #endif InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0.cc b/paludis/repositories/e/e_repository_TEST_exheres_0.cc index 95530c0a6..f618f82f2 100644 --- a/paludis/repositories/e/e_repository_TEST_exheres_0.cc +++ b/paludis/repositories/e/e_repository_TEST_exheres_0.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -127,10 +127,10 @@ namespace test_cases std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); installed_repo->add_version("cat", "pretend-installed", "0")->provide_key()->set_from_string("virtual/virtual-pretend-installed"); installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed"); @@ -149,11 +149,11 @@ namespace test_cases #endif InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); { diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc index 46017f12b..2b7d2821b 100644 --- a/paludis/repositories/e/e_repository_TEST_exlibs.cc +++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh * Copyright (c) 2009 Bo Ørsted Andresen * * This file is part of the Paludis package manager. Paludis is free software; @@ -138,19 +138,19 @@ namespace std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); env.package_database()->add_repository(2, installed_repo); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( diff --git a/paludis/repositories/e/e_repository_TEST_phases.cc b/paludis/repositories/e/e_repository_TEST_phases.cc index a6499e945..dbe6d91e1 100644 --- a/paludis/repositories/e/e_repository_TEST_phases.cc +++ b/paludis/repositories/e/e_repository_TEST_phases.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -138,10 +138,10 @@ namespace std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); installed_repo->add_version("cat", "pretend-installed", "0")->provide_key()->set_from_string("virtual/virtual-pretend-installed"); installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed"); @@ -162,11 +162,11 @@ namespace extra_settings(env); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( diff --git a/paludis/repositories/e/e_repository_TEST_replacing.cc b/paludis/repositories/e/e_repository_TEST_replacing.cc index 3b775ca2d..405aa4696 100644 --- a/paludis/repositories/e/e_repository_TEST_replacing.cc +++ b/paludis/repositories/e/e_repository_TEST_replacing.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2009 Ciaran McCreesh + * Copyright (c) 2009, 2010 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 @@ -132,10 +132,10 @@ namespace std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); installed_repo->add_version("cat", replacing_pkg_name, "1")->set_slot(SlotName("1")); installed_repo->add_version("cat", replacing_pkg_name, "2")->set_slot(SlotName("2")); @@ -148,11 +148,11 @@ namespace filter::InstalledAtRoot(env.root()))]); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&do_uninstall), - value_for<n::replacing>(rlist), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &do_uninstall, + n::replacing() = rlist, + n::want_phase() = &want_all_phases )); const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( diff --git a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc index b0ed3d2bb..4ca312f5b 100644 --- a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc +++ b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -134,11 +134,11 @@ namespace test_cases env.package_database()->add_repository(1, installed_repo); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( diff --git a/paludis/repositories/e/e_repository_mask_file.cc b/paludis/repositories/e/e_repository_mask_file.cc index ede6c9e5e..3a1373759 100644 --- a/paludis/repositories/e/e_repository_mask_file.cc +++ b/paludis/repositories/e/e_repository_mask_file.cc @@ -84,7 +84,7 @@ MaskFile::MaskFile(const FSEntry & f, const LineConfigFileOptions & opts) : } _imp->lines.push_back(std::make_pair(*it, std::tr1::shared_ptr<RepositoryMaskInfo>(new RepositoryMaskInfo( - make_named_values<RepositoryMaskInfo>(value_for<n::comment>(comment), value_for<n::mask_file>(f)))))); + make_named_values<RepositoryMaskInfo>(n::comment() = comment, n::mask_file() = f))))); comment_used = true; } } diff --git a/paludis/repositories/e/e_repository_params.hh b/paludis/repositories/e/e_repository_params.hh index 13382f1a5..58389bdde 100644 --- a/paludis/repositories/e/e_repository_params.hh +++ b/paludis/repositories/e/e_repository_params.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -39,37 +39,37 @@ namespace paludis namespace n { - struct append_repository_name_to_write_cache; - struct auto_profiles; - struct binary_destination; - struct binary_distdir; - struct binary_keywords; - struct binary_uri_prefix; - struct builddir; - struct cache; - struct distdir; - struct eapi_when_unknown; - struct eapi_when_unspecified; - struct eclassdirs; - struct entry_format; - struct environment; - struct ignore_deprecated_profiles; - struct layout; - struct location; - struct master_repositories; - struct names_cache; - struct newsdir; - struct profile_eapi_when_unspecified; - struct profile_layout; - struct profiles; - struct profiles_explicitly_set; - struct securitydir; - struct setsdir; - struct sync; - struct sync_options; - struct use_manifest; - struct write_bin_uri_prefix; - struct write_cache; + typedef Name<struct append_repository_name_to_write_cache_name> append_repository_name_to_write_cache; + typedef Name<struct auto_profiles_name> auto_profiles; + typedef Name<struct binary_destination_name> binary_destination; + typedef Name<struct binary_distdir_name> binary_distdir; + typedef Name<struct binary_keywords_name> binary_keywords; + typedef Name<struct binary_uri_prefix_name> binary_uri_prefix; + typedef Name<struct builddir_name> builddir; + typedef Name<struct cache_name> cache; + typedef Name<struct distdir_name> distdir; + typedef Name<struct eapi_when_unknown_name> eapi_when_unknown; + typedef Name<struct eapi_when_unspecified_name> eapi_when_unspecified; + typedef Name<struct eclassdirs_name> eclassdirs; + typedef Name<struct entry_format_name> entry_format; + typedef Name<struct environment_name> environment; + typedef Name<struct ignore_deprecated_profiles_name> ignore_deprecated_profiles; + typedef Name<struct layout_name> layout; + typedef Name<struct location_name> location; + typedef Name<struct master_repositories_name> master_repositories; + typedef Name<struct names_cache_name> names_cache; + typedef Name<struct newsdir_name> newsdir; + typedef Name<struct profile_eapi_when_unspecified_name> profile_eapi_when_unspecified; + typedef Name<struct profile_layout_name> profile_layout; + typedef Name<struct profiles_name> profiles; + typedef Name<struct profiles_explicitly_set_name> profiles_explicitly_set; + typedef Name<struct securitydir_name> securitydir; + typedef Name<struct setsdir_name> setsdir; + typedef Name<struct sync_name> sync; + typedef Name<struct sync_options_name> sync_options; + typedef Name<struct use_manifest_name> use_manifest; + typedef Name<struct write_bin_uri_prefix_name> write_bin_uri_prefix; + typedef Name<struct write_cache_name> write_cache; } namespace erepository diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc index ecb65c5c6..d3d29438b 100644 --- a/paludis/repositories/e/e_repository_sets.cc +++ b/paludis/repositories/e/e_repository_sets.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010 Ciaran McCreesh * Copyright (c) 2006 Danny van Dyk * * This file is part of the Paludis package manager. Paludis is free software; @@ -119,12 +119,12 @@ ERepositorySets::package_set(const SetName & ss) const Context context("When loading package set '" + stringify(s.first) + "' from '" + stringify(ff) + "':"); SetFile f(make_named_values<SetFileParams>( - value_for<n::environment>(_imp->environment), - value_for<n::file_name>(ff), - value_for<n::parser>(std::tr1::bind(&parse_user_package_dep_spec, _1, _imp->environment, UserPackageDepSpecOptions() + updso_no_disambiguation + updso_throw_if_set, filter::All())), - value_for<n::set_operator_mode>(s.second), - value_for<n::tag>(tag), - value_for<n::type>(sft_paludis_conf) + n::environment() = _imp->environment, + n::file_name() = ff, + n::parser() = std::tr1::bind(&parse_user_package_dep_spec, _1, _imp->environment, UserPackageDepSpecOptions() + updso_no_disambiguation + updso_throw_if_set, filter::All()), + n::set_operator_mode() = s.second, + n::tag() = tag, + n::type() = sft_paludis_conf )); return f.contents(); @@ -221,9 +221,9 @@ namespace { return e.version().remove_revision() == VersionSpec(ver, ver_options).remove_revision() && match_range(e, make_named_values<erepository::GLSARange>( - value_for<n::op>(r.op().substr(1)), - value_for<n::slot>(r.slot()), - value_for<n::version>(r.version())), + n::op() = r.op().substr(1), + n::slot() = r.slot(), + n::version() = r.version()), ver_options, pds_options); } @@ -314,8 +314,8 @@ ERepositorySets::security_set(bool insecurity) const make_package_dep_spec(PartiallyMadePackageDepSpecOptions()) .package((*c)->name()) .version_requirement(make_named_values<VersionRequirement>( - value_for<n::version_operator>(vo_equal), - value_for<n::version_spec>((*c)->version()))) + n::version_operator() = vo_equal, + n::version_spec() = (*c)->version())) .in_repository((*c)->repository()->name()))); spec->set_tag(glsa_tags.find(glsa->id())->second); security_packages->root()->append(spec); @@ -347,8 +347,8 @@ ERepositorySets::security_set(bool insecurity) const std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()) .package((*r)->name()) .version_requirement(make_named_values<VersionRequirement>( - value_for<n::version_operator>(vo_equal), - value_for<n::version_spec>((*r)->version()))) + n::version_operator() = vo_equal, + n::version_spec() = (*r)->version())) .in_repository((*r)->repository()->name()))); spec->set_tag(glsa_tags.find(glsa->id())->second); security_packages->root()->append(spec); diff --git a/paludis/repositories/e/e_repository_sets_TEST.cc b/paludis/repositories/e/e_repository_sets_TEST.cc index a5069d853..32b5ec699 100644 --- a/paludis/repositories/e/e_repository_sets_TEST.cc +++ b/paludis/repositories/e/e_repository_sets_TEST.cc @@ -92,10 +92,10 @@ namespace test_cases std::tr1::bind(from_keys, keys, std::tr1::placeholders::_1))); std::tr1::shared_ptr<FakeInstalledRepository> installed(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); installed->add_version("cat-two", "bar", "1.5"); env.package_database()->add_repository(0, installed); @@ -165,10 +165,10 @@ namespace test_cases env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<FakeInstalledRepository> installed(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); installed->add_version("cat-one", "foo", "2.1"); installed->add_version("cat-two", "bar", "1.5"); diff --git a/paludis/repositories/e/e_stripper.cc b/paludis/repositories/e/e_stripper.cc index 552254321..dcc65c953 100644 --- a/paludis/repositories/e/e_stripper.cc +++ b/paludis/repositories/e/e_stripper.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -43,10 +43,10 @@ namespace paludis EStripper::EStripper(const EStripperOptions & options) : Stripper(make_named_values<StripperOptions>( - value_for<n::debug_dir>(options.debug_dir()), - value_for<n::image_dir>(options.image_dir()), - value_for<n::split>(options.split()), - value_for<n::strip>(options.strip()) + n::debug_dir() = options.debug_dir(), + n::image_dir() = options.image_dir(), + n::split() = options.split(), + n::strip() = options.strip() )), PrivateImplementationPattern<EStripper>(new Implementation<EStripper>(options)), _imp(PrivateImplementationPattern<EStripper>::_imp) diff --git a/paludis/repositories/e/e_stripper.hh b/paludis/repositories/e/e_stripper.hh index 695cac14f..695b1be42 100644 --- a/paludis/repositories/e/e_stripper.hh +++ b/paludis/repositories/e/e_stripper.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -30,12 +30,12 @@ namespace paludis { namespace n { - struct debug_dir; - struct image_dir; - struct output_manager; - struct package_id; - struct split; - struct strip; + typedef Name<struct debug_dir_name> debug_dir; + typedef Name<struct image_dir_name> image_dir; + typedef Name<struct output_manager_name> output_manager; + typedef Name<struct package_id_name> package_id; + typedef Name<struct split_name> split; + typedef Name<struct strip_name> strip; } namespace erepository diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc index 21386ae06..1e27da262 100644 --- a/paludis/repositories/e/eapi.cc +++ b/paludis/repositories/e/eapi.cc @@ -71,80 +71,80 @@ namespace std::tr1::shared_ptr<const EAPIEbuildEnvironmentVariables> make_ebuild_environment_variables(const KeyValueConfigFile & k) { return make_shared_ptr(new EAPIEbuildEnvironmentVariables(make_named_values<EAPIEbuildEnvironmentVariables>( - value_for<n::description_choices>(check_get(k, "description_choices")), - value_for<n::description_use>(check_get(k, "description_use")), - value_for<n::env_a>(check_get(k, "env_a")), - value_for<n::env_aa>(check_get(k, "env_aa")), - value_for<n::env_accept_keywords>(check_get(k, "env_accept_keywords")), - value_for<n::env_arch>(check_get(k, "env_arch")), - value_for<n::env_d>(check_get(k, "env_d")), - value_for<n::env_distdir>(check_get(k, "env_distdir")), - value_for<n::env_ebuild_phase>(check_get(k, "env_ebuild_phase")), - value_for<n::env_ed>(check_get(k, "env_ed")), - value_for<n::env_eprefix>(check_get(k, "env_eprefix")), - value_for<n::env_eroot>(check_get(k, "env_eroot")), - value_for<n::env_filesdir>(check_get(k, "env_filesdir")), - value_for<n::env_iuse_implicit>(check_get(k, "env_iuse_implicit")), - value_for<n::env_jobs>(check_get(k, "env_jobs")), - value_for<n::env_kv>(check_get(k, "env_kv")), - value_for<n::env_p>(check_get(k, "env_p")), - value_for<n::env_pf>(check_get(k, "env_pf")), - value_for<n::env_portdir>(check_get(k, "env_portdir")), - value_for<n::env_replaced_by_id>(check_get(k, "env_replaced_by_id")), - value_for<n::env_replaced_by_version>(check_get(k, "env_replaced_by_version")), - value_for<n::env_replacing_ids>(check_get(k, "env_replacing_ids")), - value_for<n::env_replacing_versions>(check_get(k, "env_replacing_versions")), - value_for<n::env_t>(check_get(k, "env_t")), - value_for<n::env_use>(check_get(k, "env_use")), - value_for<n::env_use_expand>(check_get(k, "env_use_expand")), - value_for<n::env_use_expand_hidden>(check_get(k, "env_use_expand_hidden")), - value_for<n::env_use_expand_implicit>(check_get(k, "env_use_expand_implicit")), - value_for<n::env_use_expand_unprefixed>(check_get(k, "env_use_expand_unprefixed")), - value_for<n::env_use_expand_values_part>(check_get(k, "env_use_expand_values_part")) + n::description_choices() = check_get(k, "description_choices"), + n::description_use() = check_get(k, "description_use"), + n::env_a() = check_get(k, "env_a"), + n::env_aa() = check_get(k, "env_aa"), + n::env_accept_keywords() = check_get(k, "env_accept_keywords"), + n::env_arch() = check_get(k, "env_arch"), + n::env_d() = check_get(k, "env_d"), + n::env_distdir() = check_get(k, "env_distdir"), + n::env_ebuild_phase() = check_get(k, "env_ebuild_phase"), + n::env_ed() = check_get(k, "env_ed"), + n::env_eprefix() = check_get(k, "env_eprefix"), + n::env_eroot() = check_get(k, "env_eroot"), + n::env_filesdir() = check_get(k, "env_filesdir"), + n::env_iuse_implicit() = check_get(k, "env_iuse_implicit"), + n::env_jobs() = check_get(k, "env_jobs"), + n::env_kv() = check_get(k, "env_kv"), + n::env_p() = check_get(k, "env_p"), + n::env_pf() = check_get(k, "env_pf"), + n::env_portdir() = check_get(k, "env_portdir"), + n::env_replaced_by_id() = check_get(k, "env_replaced_by_id"), + n::env_replaced_by_version() = check_get(k, "env_replaced_by_version"), + n::env_replacing_ids() = check_get(k, "env_replacing_ids"), + n::env_replacing_versions() = check_get(k, "env_replacing_versions"), + n::env_t() = check_get(k, "env_t"), + n::env_use() = check_get(k, "env_use"), + n::env_use_expand() = check_get(k, "env_use_expand"), + n::env_use_expand_hidden() = check_get(k, "env_use_expand_hidden"), + n::env_use_expand_implicit() = check_get(k, "env_use_expand_implicit"), + n::env_use_expand_unprefixed() = check_get(k, "env_use_expand_unprefixed"), + n::env_use_expand_values_part() = check_get(k, "env_use_expand_values_part") ))); } std::tr1::shared_ptr<EAPIMetadataVariable> make_metadata_variable(const KeyValueConfigFile & k, const std::string & s) { return make_shared_ptr(new EAPIMetadataVariable(make_named_values<EAPIMetadataVariable>( - value_for<n::description>(check_get(k, "description_" + s)), - value_for<n::flat_list_index>(destringify_key<int>(k, "flat_list_" + s)), - value_for<n::name>(check_get(k, "metadata_" + s)) + n::description() = check_get(k, "description_" + s), + n::flat_list_index() = destringify_key<int>(k, "flat_list_" + s), + n::name() = check_get(k, "metadata_" + s) ))); } std::tr1::shared_ptr<const EAPIEbuildMetadataVariables> make_ebuild_metadata_variables(const KeyValueConfigFile & k) { return make_shared_ptr(new EAPIEbuildMetadataVariables(make_named_values<EAPIEbuildMetadataVariables>( - value_for<n::bugs_to>(make_metadata_variable(k, "bugs_to")), - value_for<n::build_depend>(make_metadata_variable(k, "build_depend")), - value_for<n::defined_phases>(make_metadata_variable(k, "defined_phases")), - value_for<n::dependencies>(make_metadata_variable(k, "dependencies")), - value_for<n::eapi>(make_metadata_variable(k, "eapi")), - value_for<n::homepage>(make_metadata_variable(k, "homepage")), - value_for<n::inherited>(make_metadata_variable(k, "inherited")), - value_for<n::iuse>(make_metadata_variable(k, "iuse")), - value_for<n::iuse_effective>(make_metadata_variable(k, "iuse_effective")), - value_for<n::keywords>(make_metadata_variable(k, "keywords")), - value_for<n::license>(make_metadata_variable(k, "license")), - value_for<n::long_description>(make_metadata_variable(k, "long_description")), - value_for<n::minimum_flat_list_size>(destringify_key<int>(k, "flat_list_minimum_size")), - value_for<n::myoptions>(make_metadata_variable(k, "myoptions")), - value_for<n::pdepend>(make_metadata_variable(k, "pdepend")), - value_for<n::properties>(make_metadata_variable(k, "properties")), - value_for<n::provide>(make_metadata_variable(k, "provide")), - value_for<n::remote_ids>(make_metadata_variable(k, "remote_ids")), - value_for<n::restrictions>(make_metadata_variable(k, "restrict")), - value_for<n::run_depend>(make_metadata_variable(k, "run_depend")), - value_for<n::short_description>(make_metadata_variable(k, "short_description")), - value_for<n::slot>(make_metadata_variable(k, "slot")), - value_for<n::src_uri>(make_metadata_variable(k, "src_uri")), - value_for<n::upstream_changelog>(make_metadata_variable(k, "upstream_changelog")), - value_for<n::upstream_documentation>(make_metadata_variable(k, "upstream_documentation")), - value_for<n::upstream_release_notes>(make_metadata_variable(k, "upstream_release_notes")), - value_for<n::use>(make_metadata_variable(k, "use")), - value_for<n::use_expand>(make_metadata_variable(k, "use_expand")), - value_for<n::use_expand_hidden>(make_metadata_variable(k, "use_expand_hidden")) + n::bugs_to() = make_metadata_variable(k, "bugs_to"), + n::build_depend() = make_metadata_variable(k, "build_depend"), + n::defined_phases() = make_metadata_variable(k, "defined_phases"), + n::dependencies() = make_metadata_variable(k, "dependencies"), + n::eapi() = make_metadata_variable(k, "eapi"), + n::homepage() = make_metadata_variable(k, "homepage"), + n::inherited() = make_metadata_variable(k, "inherited"), + n::iuse() = make_metadata_variable(k, "iuse"), + n::iuse_effective() = make_metadata_variable(k, "iuse_effective"), + n::keywords() = make_metadata_variable(k, "keywords"), + n::license() = make_metadata_variable(k, "license"), + n::long_description() = make_metadata_variable(k, "long_description"), + n::minimum_flat_list_size() = destringify_key<int>(k, "flat_list_minimum_size"), + n::myoptions() = make_metadata_variable(k, "myoptions"), + n::pdepend() = make_metadata_variable(k, "pdepend"), + n::properties() = make_metadata_variable(k, "properties"), + n::provide() = make_metadata_variable(k, "provide"), + n::remote_ids() = make_metadata_variable(k, "remote_ids"), + n::restrictions() = make_metadata_variable(k, "restrict"), + n::run_depend() = make_metadata_variable(k, "run_depend"), + n::short_description() = make_metadata_variable(k, "short_description"), + n::slot() = make_metadata_variable(k, "slot"), + n::src_uri() = make_metadata_variable(k, "src_uri"), + n::upstream_changelog() = make_metadata_variable(k, "upstream_changelog"), + n::upstream_documentation() = make_metadata_variable(k, "upstream_documentation"), + n::upstream_release_notes() = make_metadata_variable(k, "upstream_release_notes"), + n::use() = make_metadata_variable(k, "use"), + n::use_expand() = make_metadata_variable(k, "use_expand"), + n::use_expand_hidden() = make_metadata_variable(k, "use_expand_hidden") ))); } @@ -158,106 +158,106 @@ namespace std::tr1::shared_ptr<const EAPIEbuildOptions> make_ebuild_options(const KeyValueConfigFile & k) { return make_shared_ptr(new EAPIEbuildOptions(make_named_values<EAPIEbuildOptions>( - value_for<n::binary_from_env_variables>(check_get(k, "binary_from_env_variables")), - value_for<n::bracket_merged_variables>(check_get(k, "bracket_merged_variables")), - value_for<n::bracket_merged_variables_annotatable>(check_get(k, "bracket_merged_variables_annotatable")), - value_for<n::bracket_merged_variables_annotation>(check_get(k, "bracket_merged_variables_annotation")), - value_for<n::directory_if_exists_variables>(check_get(k, "directory_if_exists_variables")), - value_for<n::directory_variables>(check_get(k, "directory_variables")), - value_for<n::ebuild_functions>(check_get(k, "ebuild_functions")), - value_for<n::ebuild_module_suffixes>(check_get(k, "ebuild_module_suffixes")), - value_for<n::ebuild_must_not_set_variables>(check_get(k, "ebuild_must_not_set_variables")), - value_for<n::eclass_must_not_set_variables>(check_get(k, "eclass_must_not_set_variables")), - value_for<n::f_function_prefix>(check_get(k, "f_function_prefix")), - value_for<n::fix_mtimes>(destringify_key<bool>(k, "fix_mtimes")), - value_for<n::ignore_pivot_env_functions>(check_get(k, "ignore_pivot_env_functions")), - value_for<n::ignore_pivot_env_variables>(check_get(k, "ignore_pivot_env_variables")), - value_for<n::load_modules>(check_get(k, "load_modules")), - value_for<n::must_not_change_after_source_variables>(check_get(k, "must_not_change_after_source_variables")), - value_for<n::must_not_change_variables>(check_get(k, "must_not_change_variables")), - value_for<n::must_not_set_vars_starting_with>(check_get(k, "must_not_set_vars_starting_with")), - value_for<n::no_s_workdir_fallback>(destringify_key<bool>(k, "no_s_workdir_fallback")), - value_for<n::non_empty_variables>(check_get(k, "non_empty_variables")), - value_for<n::rdepend_defaults_to_depend>(destringify_key<bool>(k, "rdepend_defaults_to_depend")), - value_for<n::require_use_expand_in_iuse>(destringify_key<bool>(k, "require_use_expand_in_iuse")), - value_for<n::restrict_fetch>(make_set(check_get(k, "restrict_fetch"))), - value_for<n::restrict_mirror>(make_set(check_get(k, "restrict_mirror"))), - value_for<n::restrict_primaryuri>(make_set(check_get(k, "restrict_primaryuri"))), - value_for<n::save_base_variables>(check_get(k, "save_base_variables")), - value_for<n::save_unmodifiable_variables>(check_get(k, "save_unmodifiable_variables")), - value_for<n::save_variables>(check_get(k, "save_variables")), - value_for<n::shell_options>(check_get(k, "shell_options")), - value_for<n::source_merged_variables>(check_get(k, "source_merged_variables")), - value_for<n::support_eclasses>(destringify_key<bool>(k, "support_eclasses")), - value_for<n::support_exlibs>(destringify_key<bool>(k, "support_exlibs")), - value_for<n::utility_path_suffixes>(check_get(k, "utility_path_suffixes")), - value_for<n::vdb_from_env_unless_empty_variables>(check_get(k, "vdb_from_env_unless_empty_variables")), - value_for<n::vdb_from_env_variables>(check_get(k, "vdb_from_env_variables")), - value_for<n::want_portage_emulation_vars>(destringify_key<bool>(k, "want_portage_emulation_vars")) + n::binary_from_env_variables() = check_get(k, "binary_from_env_variables"), + n::bracket_merged_variables() = check_get(k, "bracket_merged_variables"), + n::bracket_merged_variables_annotatable() = check_get(k, "bracket_merged_variables_annotatable"), + n::bracket_merged_variables_annotation() = check_get(k, "bracket_merged_variables_annotation"), + n::directory_if_exists_variables() = check_get(k, "directory_if_exists_variables"), + n::directory_variables() = check_get(k, "directory_variables"), + n::ebuild_functions() = check_get(k, "ebuild_functions"), + n::ebuild_module_suffixes() = check_get(k, "ebuild_module_suffixes"), + n::ebuild_must_not_set_variables() = check_get(k, "ebuild_must_not_set_variables"), + n::eclass_must_not_set_variables() = check_get(k, "eclass_must_not_set_variables"), + n::f_function_prefix() = check_get(k, "f_function_prefix"), + n::fix_mtimes() = destringify_key<bool>(k, "fix_mtimes"), + n::ignore_pivot_env_functions() = check_get(k, "ignore_pivot_env_functions"), + n::ignore_pivot_env_variables() = check_get(k, "ignore_pivot_env_variables"), + n::load_modules() = check_get(k, "load_modules"), + n::must_not_change_after_source_variables() = check_get(k, "must_not_change_after_source_variables"), + n::must_not_change_variables() = check_get(k, "must_not_change_variables"), + n::must_not_set_vars_starting_with() = check_get(k, "must_not_set_vars_starting_with"), + n::no_s_workdir_fallback() = destringify_key<bool>(k, "no_s_workdir_fallback"), + n::non_empty_variables() = check_get(k, "non_empty_variables"), + n::rdepend_defaults_to_depend() = destringify_key<bool>(k, "rdepend_defaults_to_depend"), + n::require_use_expand_in_iuse() = destringify_key<bool>(k, "require_use_expand_in_iuse"), + n::restrict_fetch() = make_set(check_get(k, "restrict_fetch")), + n::restrict_mirror() = make_set(check_get(k, "restrict_mirror")), + n::restrict_primaryuri() = make_set(check_get(k, "restrict_primaryuri")), + n::save_base_variables() = check_get(k, "save_base_variables"), + n::save_unmodifiable_variables() = check_get(k, "save_unmodifiable_variables"), + n::save_variables() = check_get(k, "save_variables"), + n::shell_options() = check_get(k, "shell_options"), + n::source_merged_variables() = check_get(k, "source_merged_variables"), + n::support_eclasses() = destringify_key<bool>(k, "support_eclasses"), + n::support_exlibs() = destringify_key<bool>(k, "support_exlibs"), + n::utility_path_suffixes() = check_get(k, "utility_path_suffixes"), + n::vdb_from_env_unless_empty_variables() = check_get(k, "vdb_from_env_unless_empty_variables"), + n::vdb_from_env_variables() = check_get(k, "vdb_from_env_variables"), + n::want_portage_emulation_vars() = destringify_key<bool>(k, "want_portage_emulation_vars") ))); } std::tr1::shared_ptr<const EAPIEbuildPhases> make_ebuild_phases(const KeyValueConfigFile & k) { return make_shared_ptr(new EAPIEbuildPhases(make_named_values<EAPIEbuildPhases>( - value_for<n::ebuild_bad_options>(check_get(k, "ebuild_bad_options")), - value_for<n::ebuild_config>(check_get(k, "ebuild_config")), - value_for<n::ebuild_fetch_extra>(check_get(k, "ebuild_fetch_extra")), - value_for<n::ebuild_info>(check_get(k, "ebuild_info")), - value_for<n::ebuild_install>(check_get(k, "ebuild_install")), - value_for<n::ebuild_metadata>(check_get(k, "ebuild_metadata")), - value_for<n::ebuild_new_upgrade_phase_order>(destringify_key<bool>(k, "ebuild_new_upgrade_phase_order")), - value_for<n::ebuild_nofetch>(check_get(k, "ebuild_nofetch")), - value_for<n::ebuild_pretend>(check_get(k, "ebuild_pretend")), - value_for<n::ebuild_uninstall>(check_get(k, "ebuild_uninstall")), - value_for<n::ebuild_variable>(check_get(k, "ebuild_variable")) + n::ebuild_bad_options() = check_get(k, "ebuild_bad_options"), + n::ebuild_config() = check_get(k, "ebuild_config"), + n::ebuild_fetch_extra() = check_get(k, "ebuild_fetch_extra"), + n::ebuild_info() = check_get(k, "ebuild_info"), + n::ebuild_install() = check_get(k, "ebuild_install"), + n::ebuild_metadata() = check_get(k, "ebuild_metadata"), + n::ebuild_new_upgrade_phase_order() = destringify_key<bool>(k, "ebuild_new_upgrade_phase_order"), + n::ebuild_nofetch() = check_get(k, "ebuild_nofetch"), + n::ebuild_pretend() = check_get(k, "ebuild_pretend"), + n::ebuild_uninstall() = check_get(k, "ebuild_uninstall"), + n::ebuild_variable() = check_get(k, "ebuild_variable") ))); } std::tr1::shared_ptr<const EAPIPipeCommands> make_pipe_commands(const KeyValueConfigFile & k) { return make_shared_ptr(new EAPIPipeCommands(make_named_values<EAPIPipeCommands>( - value_for<n::no_slot_or_repo>(destringify_key<bool>(k, "pipe_commands_no_slot_or_repo")), - value_for<n::rewrite_virtuals>(destringify_key<bool>(k, "pipe_commands_rewrite_virtuals")) + n::no_slot_or_repo() = destringify_key<bool>(k, "pipe_commands_no_slot_or_repo"), + n::rewrite_virtuals() = destringify_key<bool>(k, "pipe_commands_rewrite_virtuals") ))); } std::tr1::shared_ptr<const EAPIToolsOptions> make_tool_options(const KeyValueConfigFile & k) { return make_shared_ptr(new EAPIToolsOptions(make_named_values<EAPIToolsOptions>( - value_for<n::dodoc_r>(destringify_key<bool>(k, "dodoc_r")), - value_for<n::doins_symlink>(destringify_key<bool>(k, "doins_symlink")), - value_for<n::doman_lang_filenames>(destringify_key<bool>(k, "doman_lang_filenames")), - value_for<n::dosym_mkdir>(destringify_key<bool>(k, "dosym_mkdir")), - value_for<n::econf_extra_options>(k.get("econf_extra_options")), - value_for<n::failure_is_fatal>(destringify_key<bool>(k, "failure_is_fatal")), - value_for<n::unpack_fix_permissions>(destringify_key<bool>(k, "unpack_fix_permissions")), - value_for<n::unpack_suffixes>(k.get("unpack_suffixes")), - value_for<n::unpack_unrecognised_is_fatal>(destringify_key<bool>(k, "unpack_unrecognised_is_fatal")) + n::dodoc_r() = destringify_key<bool>(k, "dodoc_r"), + n::doins_symlink() = destringify_key<bool>(k, "doins_symlink"), + n::doman_lang_filenames() = destringify_key<bool>(k, "doman_lang_filenames"), + n::dosym_mkdir() = destringify_key<bool>(k, "dosym_mkdir"), + n::econf_extra_options() = k.get("econf_extra_options"), + n::failure_is_fatal() = destringify_key<bool>(k, "failure_is_fatal"), + n::unpack_fix_permissions() = destringify_key<bool>(k, "unpack_fix_permissions"), + n::unpack_suffixes() = k.get("unpack_suffixes"), + n::unpack_unrecognised_is_fatal() = destringify_key<bool>(k, "unpack_unrecognised_is_fatal") ))); } std::tr1::shared_ptr<const EAPIAnnotations> make_annotations(const KeyValueConfigFile & k) { return make_shared_ptr(new EAPIAnnotations(make_named_values<EAPIAnnotations>( - value_for<n::myoptions_description>(k.get("annotations_myoptions_description")), - value_for<n::myoptions_number_selected>(k.get("annotations_myoptions_number_selected")), - value_for<n::myoptions_number_selected_at_least_one>(k.get("annotations_myoptions_number_selected_at_least_one")), - value_for<n::myoptions_number_selected_at_most_one>(k.get("annotations_myoptions_number_selected_at_most_one")), - value_for<n::myoptions_number_selected_exactly_one>(k.get("annotations_myoptions_number_selected_exactly_one")), - value_for<n::myoptions_requires>(k.get("annotations_myoptions_requires")) + n::myoptions_description() = k.get("annotations_myoptions_description"), + n::myoptions_number_selected() = k.get("annotations_myoptions_number_selected"), + n::myoptions_number_selected_at_least_one() = k.get("annotations_myoptions_number_selected_at_least_one"), + n::myoptions_number_selected_at_most_one() = k.get("annotations_myoptions_number_selected_at_most_one"), + n::myoptions_number_selected_exactly_one() = k.get("annotations_myoptions_number_selected_exactly_one"), + n::myoptions_requires() = k.get("annotations_myoptions_requires") ))); } std::tr1::shared_ptr<const EAPIChoicesOptions> make_choices_options(const KeyValueConfigFile & k) { return make_shared_ptr(new EAPIChoicesOptions(make_named_values<EAPIChoicesOptions>( - value_for<n::fancy_test_flag>(check_get(k, "fancy_test_flag")), - value_for<n::has_expensive_tests>(destringify_key<bool>(k, "has_expensive_tests")), - value_for<n::has_optional_tests>(destringify_key<bool>(k, "has_optional_tests")), - value_for<n::has_recommended_tests>(destringify_key<bool>(k, "has_recommended_tests")), - value_for<n::profile_iuse_injection>(destringify_key<bool>(k, "profile_iuse_injection")), - value_for<n::use_expand_separator>(destringify_key<char>(k, "use_expand_separator")) + n::fancy_test_flag() = check_get(k, "fancy_test_flag"), + n::has_expensive_tests() = destringify_key<bool>(k, "has_expensive_tests"), + n::has_optional_tests() = destringify_key<bool>(k, "has_optional_tests"), + n::has_recommended_tests() = destringify_key<bool>(k, "has_recommended_tests"), + n::profile_iuse_injection() = destringify_key<bool>(k, "profile_iuse_injection"), + n::use_expand_separator() = destringify_key<char>(k, "use_expand_separator") ))); } @@ -314,24 +314,24 @@ namespace } return make_shared_ptr(new SupportedEAPI(make_named_values<SupportedEAPI>( - value_for<n::annotations>(make_annotations(k)), - value_for<n::breaks_portage>(destringify_key<bool>(k, "breaks_portage")), - value_for<n::can_be_pbin>(destringify_key<bool>(k, "can_be_pbin")), - value_for<n::choices_options>(make_choices_options(k)), - value_for<n::dependency_labels>(make_shared_ptr(new const EAPILabels(check_get(k, "dependency_labels")))), - value_for<n::dependency_spec_tree_parse_options>(dependency_spec_tree_parse_options), - value_for<n::ebuild_environment_variables>(make_ebuild_environment_variables(k)), - value_for<n::ebuild_metadata_variables>(make_ebuild_metadata_variables(k)), - value_for<n::ebuild_options>(make_ebuild_options(k)), - value_for<n::ebuild_phases>(make_ebuild_phases(k)), - value_for<n::iuse_flag_parse_options>(iuse_flag_parse_options), - value_for<n::merger_options>(merger_options), - value_for<n::package_dep_spec_parse_options>(package_dep_spec_parse_options), - value_for<n::pipe_commands>(make_pipe_commands(k)), - value_for<n::tools_options>(make_tool_options(k)), - value_for<n::uri_labels>(make_shared_ptr(new const EAPILabels(check_get(k, "uri_labels")))), - value_for<n::userpriv_cannot_use_root>(destringify_key<bool>(k, "userpriv_cannot_use_root")), - value_for<n::version_spec_options>(version_spec_options) + n::annotations() = make_annotations(k), + n::breaks_portage() = destringify_key<bool>(k, "breaks_portage"), + n::can_be_pbin() = destringify_key<bool>(k, "can_be_pbin"), + n::choices_options() = make_choices_options(k), + n::dependency_labels() = make_shared_ptr(new const EAPILabels(check_get(k, "dependency_labels"))), + n::dependency_spec_tree_parse_options() = dependency_spec_tree_parse_options, + n::ebuild_environment_variables() = make_ebuild_environment_variables(k), + n::ebuild_metadata_variables() = make_ebuild_metadata_variables(k), + n::ebuild_options() = make_ebuild_options(k), + n::ebuild_phases() = make_ebuild_phases(k), + n::iuse_flag_parse_options() = iuse_flag_parse_options, + n::merger_options() = merger_options, + n::package_dep_spec_parse_options() = package_dep_spec_parse_options, + n::pipe_commands() = make_pipe_commands(k), + n::tools_options() = make_tool_options(k), + n::uri_labels() = make_shared_ptr(new const EAPILabels(check_get(k, "uri_labels"))), + n::userpriv_cannot_use_root() = destringify_key<bool>(k, "userpriv_cannot_use_root"), + n::version_spec_options() = version_spec_options ))); } } @@ -359,9 +359,9 @@ namespace paludis &KeyValueConfigFile::no_transformation); std::tr1::shared_ptr<EAPI> eapi(new EAPI(make_named_values<EAPI>( - value_for<n::exported_name>(check_get(k, "exported_name")), - value_for<n::name>(strip_trailing_string(d->basename(), ".conf")), - value_for<n::supported>(make_supported_eapi(k)) + n::exported_name() = check_get(k, "exported_name"), + n::name() = strip_trailing_string(d->basename(), ".conf"), + n::supported() = make_supported_eapi(k) ))); values.insert(std::make_pair(strip_trailing_string(d->basename(), ".conf"), eapi)); @@ -398,9 +398,9 @@ EAPIData::eapi_from_string(const std::string & s) const return i->second; return make_shared_ptr(new EAPI(make_named_values<EAPI>( - value_for<n::exported_name>(s), - value_for<n::name>(s), - value_for<n::supported>(std::tr1::shared_ptr<const SupportedEAPI>())) + n::exported_name() = s, + n::name() = s, + n::supported() = std::tr1::shared_ptr<const SupportedEAPI>()) )); } @@ -408,9 +408,9 @@ std::tr1::shared_ptr<const EAPI> EAPIData::unknown_eapi() const { return make_shared_ptr(new EAPI(make_named_values<EAPI>( - value_for<n::exported_name>("UNKNOWN"), - value_for<n::name>("UNKNOWN"), - value_for<n::supported>(std::tr1::shared_ptr<const SupportedEAPI>())) + n::exported_name() = "UNKNOWN", + n::name() = "UNKNOWN", + n::supported() = std::tr1::shared_ptr<const SupportedEAPI>()) )); } diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh index 5829b8538..d382ef69d 100644 --- a/paludis/repositories/e/eapi.hh +++ b/paludis/repositories/e/eapi.hh @@ -37,159 +37,159 @@ namespace paludis { namespace n { - struct annotations; - struct binary_from_env_variables; - struct bracket_merged_variables; - struct bracket_merged_variables_annotatable; - struct bracket_merged_variables_annotation; - struct breaks_portage; - struct bugs_to; - struct build_depend; - struct can_be_pbin; - struct choices_options; - struct defined_phases; - struct dependencies; - struct dependency_labels; - struct dependency_spec_tree_parse_options; - struct description; - struct description_choices; - struct description_use; - struct directory_if_exists_variables; - struct directory_variables; - struct dodoc_r; - struct doins_symlink; - struct doman_lang_filenames; - struct dosym_mkdir; - struct eapi; - struct ebuild_bad_options; - struct ebuild_config; - struct ebuild_environment_variables; - struct ebuild_fetch_extra; - struct ebuild_functions; - struct ebuild_info; - struct ebuild_install; - struct ebuild_metadata; - struct ebuild_metadata_variables; - struct ebuild_module_suffixes; - struct ebuild_must_not_set_variables; - struct ebuild_nofetch; - struct ebuild_options; - struct ebuild_phases; - struct ebuild_pretend; - struct ebuild_uninstall; - struct ebuild_variable; - struct ebuild_new_upgrade_phase_order; - struct econf_extra_options; - struct eclass_must_not_set_variables; - struct env_a; - struct env_aa; - struct env_accept_keywords; - struct env_arch; - struct env_d; - struct env_distdir; - struct env_ebuild_phase; - struct env_ed; - struct env_eprefix; - struct env_eroot; - struct env_filesdir; - struct env_iuse_implicit; - struct env_jobs; - struct env_kv; - struct env_p; - struct env_pf; - struct env_portdir; - struct env_replaced_by_id; - struct env_replaced_by_version; - struct env_replacing_ids; - struct env_replacing_versions; - struct env_t; - struct env_use; - struct env_use_expand; - struct env_use_expand_hidden; - struct env_use_expand_implicit; - struct env_use_expand_unprefixed; - struct env_use_expand_values_part; - struct exported_name; - struct f_function_prefix; - struct failure_is_fatal; - struct fancy_test_flag; - struct fix_mtimes; - struct flat_list_index; - struct has_expensive_tests; - struct has_optional_tests; - struct has_recommended_tests; - struct homepage; - struct ignore_pivot_env_functions; - struct ignore_pivot_env_variables; - struct inherited; - struct iuse; - struct iuse_effective; - struct iuse_flag_parse_options; - struct keywords; - struct license; - struct load_modules; - struct long_description; - struct merger_options; - struct metadata_key; - struct minimum_flat_list_size; - struct myoptions; - struct myoptions_description; - struct myoptions_number_selected; - struct myoptions_number_selected_at_least_one; - struct myoptions_number_selected_at_most_one; - struct myoptions_number_selected_exactly_one; - struct myoptions_requires; - struct must_not_change_after_source_variables; - struct must_not_change_variables; - struct must_not_set_vars_starting_with; - struct name; - struct no_s_workdir_fallback; - struct no_slot_or_repo; - struct non_empty_variables; - struct package_dep_spec_parse_options; - struct pdepend; - struct pipe_commands; - struct profile_iuse_injection; - struct properties; - struct provide; - struct rdepend_defaults_to_depend; - struct remote_ids; - struct require_use_expand_in_iuse; - struct restrict_fetch; - struct restrict_mirror; - struct restrict_primaryuri; - struct restrictions; - struct rewrite_virtuals; - struct run_depend; - struct save_base_variables; - struct save_unmodifiable_variables; - struct save_variables; - struct shell_options; - struct short_description; - struct slot; - struct source_merged_variables; - struct src_uri; - struct support_eclasses; - struct support_exlibs; - struct supported; - struct tools_options; - struct unpack_fix_permissions; - struct unpack_suffixes; - struct unpack_unrecognised_is_fatal; - struct upstream_changelog; - struct upstream_documentation; - struct upstream_release_notes; - struct uri_labels; - struct use; - struct use_expand; - struct use_expand_hidden; - struct use_expand_separator; - struct userpriv_cannot_use_root; - struct utility_path_suffixes; - struct vdb_from_env_unless_empty_variables; - struct vdb_from_env_variables; - struct version_spec_options; - struct want_portage_emulation_vars; + typedef Name<struct annotations_name> annotations; + typedef Name<struct binary_from_env_variables_name> binary_from_env_variables; + typedef Name<struct bracket_merged_variables_name> bracket_merged_variables; + typedef Name<struct bracket_merged_variables_annotatable_name> bracket_merged_variables_annotatable; + typedef Name<struct bracket_merged_variables_annotation_name> bracket_merged_variables_annotation; + typedef Name<struct breaks_portage_name> breaks_portage; + typedef Name<struct bugs_to_name> bugs_to; + typedef Name<struct build_depend_name> build_depend; + typedef Name<struct can_be_pbin_name> can_be_pbin; + typedef Name<struct choices_options_name> choices_options; + typedef Name<struct defined_phases_name> defined_phases; + typedef Name<struct dependencies_name> dependencies; + typedef Name<struct dependency_labels_name> dependency_labels; + typedef Name<struct dependency_spec_tree_parse_options_name> dependency_spec_tree_parse_options; + typedef Name<struct description_name> description; + typedef Name<struct description_choices_name> description_choices; + typedef Name<struct description_use_name> description_use; + typedef Name<struct directory_if_exists_variables_name> directory_if_exists_variables; + typedef Name<struct directory_variables_name> directory_variables; + typedef Name<struct dodoc_r_name> dodoc_r; + typedef Name<struct doins_symlink_name> doins_symlink; + typedef Name<struct doman_lang_filenames_name> doman_lang_filenames; + typedef Name<struct dosym_mkdir_name> dosym_mkdir; + typedef Name<struct eapi_name> eapi; + typedef Name<struct ebuild_bad_options_name> ebuild_bad_options; + typedef Name<struct ebuild_config_name> ebuild_config; + typedef Name<struct ebuild_environment_variables_name> ebuild_environment_variables; + typedef Name<struct ebuild_fetch_extra_name> ebuild_fetch_extra; + typedef Name<struct ebuild_functions_name> ebuild_functions; + typedef Name<struct ebuild_info_name> ebuild_info; + typedef Name<struct ebuild_install_name> ebuild_install; + typedef Name<struct ebuild_metadata_name> ebuild_metadata; + typedef Name<struct ebuild_metadata_variables_name> ebuild_metadata_variables; + typedef Name<struct ebuild_module_suffixes_name> ebuild_module_suffixes; + typedef Name<struct ebuild_must_not_set_variables_name> ebuild_must_not_set_variables; + typedef Name<struct ebuild_nofetch_name> ebuild_nofetch; + typedef Name<struct ebuild_options_name> ebuild_options; + typedef Name<struct ebuild_phases_name> ebuild_phases; + typedef Name<struct ebuild_pretend_name> ebuild_pretend; + typedef Name<struct ebuild_uninstall_name> ebuild_uninstall; + typedef Name<struct ebuild_variable_name> ebuild_variable; + typedef Name<struct ebuild_new_upgrade_phase_order_name> ebuild_new_upgrade_phase_order; + typedef Name<struct econf_extra_options_name> econf_extra_options; + typedef Name<struct eclass_must_not_set_variables_name> eclass_must_not_set_variables; + typedef Name<struct env_a_name> env_a; + typedef Name<struct env_aa_name> env_aa; + typedef Name<struct env_accept_keywords_name> env_accept_keywords; + typedef Name<struct env_arch_name> env_arch; + typedef Name<struct env_d_name> env_d; + typedef Name<struct env_distdir_name> env_distdir; + typedef Name<struct env_ebuild_phase_name> env_ebuild_phase; + typedef Name<struct env_ed_name> env_ed; + typedef Name<struct env_eprefix_name> env_eprefix; + typedef Name<struct env_eroot_name> env_eroot; + typedef Name<struct env_filesdir_name> env_filesdir; + typedef Name<struct env_iuse_implicit_name> env_iuse_implicit; + typedef Name<struct env_jobs_name> env_jobs; + typedef Name<struct env_kv_name> env_kv; + typedef Name<struct env_p_name> env_p; + typedef Name<struct env_pf_name> env_pf; + typedef Name<struct env_portdir_name> env_portdir; + typedef Name<struct env_replaced_by_id_name> env_replaced_by_id; + typedef Name<struct env_replaced_by_version_name> env_replaced_by_version; + typedef Name<struct env_replacing_ids_name> env_replacing_ids; + typedef Name<struct env_replacing_versions_name> env_replacing_versions; + typedef Name<struct env_t_name> env_t; + typedef Name<struct env_use_name> env_use; + typedef Name<struct env_use_expand_name> env_use_expand; + typedef Name<struct env_use_expand_hidden_name> env_use_expand_hidden; + typedef Name<struct env_use_expand_implicit_name> env_use_expand_implicit; + typedef Name<struct env_use_expand_unprefixed_name> env_use_expand_unprefixed; + typedef Name<struct env_use_expand_values_part_name> env_use_expand_values_part; + typedef Name<struct exported_name_name> exported_name; + typedef Name<struct f_function_prefix_name> f_function_prefix; + typedef Name<struct failure_is_fatal_name> failure_is_fatal; + typedef Name<struct fancy_test_flag_name> fancy_test_flag; + typedef Name<struct fix_mtimes_name> fix_mtimes; + typedef Name<struct flat_list_index_name> flat_list_index; + typedef Name<struct has_expensive_tests_name> has_expensive_tests; + typedef Name<struct has_optional_tests_name> has_optional_tests; + typedef Name<struct has_recommended_tests_name> has_recommended_tests; + typedef Name<struct homepage_name> homepage; + typedef Name<struct ignore_pivot_env_functions_name> ignore_pivot_env_functions; + typedef Name<struct ignore_pivot_env_variables_name> ignore_pivot_env_variables; + typedef Name<struct inherited_name> inherited; + typedef Name<struct iuse_name> iuse; + typedef Name<struct iuse_effective_name> iuse_effective; + typedef Name<struct iuse_flag_parse_options_name> iuse_flag_parse_options; + typedef Name<struct keywords_name> keywords; + typedef Name<struct license_name> license; + typedef Name<struct load_modules_name> load_modules; + typedef Name<struct long_description_name> long_description; + typedef Name<struct merger_options_name> merger_options; + typedef Name<struct metadata_key_name> metadata_key; + typedef Name<struct minimum_flat_list_size_name> minimum_flat_list_size; + typedef Name<struct myoptions_name> myoptions; + typedef Name<struct myoptions_description_name> myoptions_description; + typedef Name<struct myoptions_number_selected_name> myoptions_number_selected; + typedef Name<struct myoptions_number_selected_at_least_one_name> myoptions_number_selected_at_least_one; + typedef Name<struct myoptions_number_selected_at_most_one_name> myoptions_number_selected_at_most_one; + typedef Name<struct myoptions_number_selected_exactly_one_name> myoptions_number_selected_exactly_one; + typedef Name<struct myoptions_requires_name> myoptions_requires; + typedef Name<struct must_not_change_after_source_variables_name> must_not_change_after_source_variables; + typedef Name<struct must_not_change_variables_name> must_not_change_variables; + typedef Name<struct must_not_set_vars_starting_with_name> must_not_set_vars_starting_with; + typedef Name<struct name_name> name; + typedef Name<struct no_s_workdir_fallback_name> no_s_workdir_fallback; + typedef Name<struct no_slot_or_repo_name> no_slot_or_repo; + typedef Name<struct non_empty_variables_name> non_empty_variables; + typedef Name<struct package_dep_spec_parse_options_name> package_dep_spec_parse_options; + typedef Name<struct pdepend_name> pdepend; + typedef Name<struct pipe_commands_name> pipe_commands; + typedef Name<struct profile_iuse_injection_name> profile_iuse_injection; + typedef Name<struct properties_name> properties; + typedef Name<struct provide_name> provide; + typedef Name<struct rdepend_defaults_to_depend_name> rdepend_defaults_to_depend; + typedef Name<struct remote_ids_name> remote_ids; + typedef Name<struct require_use_expand_in_iuse_name> require_use_expand_in_iuse; + typedef Name<struct restrict_fetch_name> restrict_fetch; + typedef Name<struct restrict_mirror_name> restrict_mirror; + typedef Name<struct restrict_primaryuri_name> restrict_primaryuri; + typedef Name<struct restrictions_name> restrictions; + typedef Name<struct rewrite_virtuals_name> rewrite_virtuals; + typedef Name<struct run_depend_name> run_depend; + typedef Name<struct save_base_variables_name> save_base_variables; + typedef Name<struct save_unmodifiable_variables_name> save_unmodifiable_variables; + typedef Name<struct save_variables_name> save_variables; + typedef Name<struct shell_options_name> shell_options; + typedef Name<struct short_description_name> short_description; + typedef Name<struct slot_name> slot; + typedef Name<struct source_merged_variables_name> source_merged_variables; + typedef Name<struct src_uri_name> src_uri; + typedef Name<struct support_eclasses_name> support_eclasses; + typedef Name<struct support_exlibs_name> support_exlibs; + typedef Name<struct supported_name> supported; + typedef Name<struct tools_options_name> tools_options; + typedef Name<struct unpack_fix_permissions_name> unpack_fix_permissions; + typedef Name<struct unpack_suffixes_name> unpack_suffixes; + typedef Name<struct unpack_unrecognised_is_fatal_name> unpack_unrecognised_is_fatal; + typedef Name<struct upstream_changelog_name> upstream_changelog; + typedef Name<struct upstream_documentation_name> upstream_documentation; + typedef Name<struct upstream_release_notes_name> upstream_release_notes; + typedef Name<struct uri_labels_name> uri_labels; + typedef Name<struct use_name> use; + typedef Name<struct use_expand_name> use_expand; + typedef Name<struct use_expand_hidden_name> use_expand_hidden; + typedef Name<struct use_expand_separator_name> use_expand_separator; + typedef Name<struct userpriv_cannot_use_root_name> userpriv_cannot_use_root; + typedef Name<struct utility_path_suffixes_name> utility_path_suffixes; + typedef Name<struct vdb_from_env_unless_empty_variables_name> vdb_from_env_unless_empty_variables; + typedef Name<struct vdb_from_env_variables_name> vdb_from_env_variables; + typedef Name<struct version_spec_options_name> version_spec_options; + typedef Name<struct want_portage_emulation_vars_name> want_portage_emulation_vars; } namespace erepository diff --git a/paludis/repositories/e/ebuild.hh b/paludis/repositories/e/ebuild.hh index 4b270ee80..baa7228aa 100644 --- a/paludis/repositories/e/ebuild.hh +++ b/paludis/repositories/e/ebuild.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -43,50 +43,50 @@ namespace paludis namespace n { - struct a; - struct aa; - struct binary_distdir; - struct binary_ebuild_location; - struct builddir; - struct clearenv; - struct commands; - struct config_protect; - struct config_protect_mask; - struct destination_repository; - struct distdir; - struct ebuild_dir; - struct ebuild_file; - struct eclassdirs; - struct environment; - struct environment_file; - struct exlibsdirs; - struct expand_vars; - struct files_dir; - struct image; - struct info_vars; - struct load_environment; - struct loadsaveenv_dir; - struct maybe_output_manager; - struct merger_options; - struct output_directory; - struct package_builddir; - struct package_id; - struct portdir; - struct profiles; - struct profiles_with_parents; - struct replaced_by; - struct replacing_ids; - struct root; - struct sandbox; - struct sydbox; - struct slot; - struct unmerge_only; - struct unmet_requirements; - struct use; - struct use_ebuild_file; - struct use_expand; - struct use_expand_hidden; - struct userpriv; + typedef Name<struct a_name> a; + typedef Name<struct aa_name> aa; + typedef Name<struct binary_distdir_name> binary_distdir; + typedef Name<struct binary_ebuild_location_name> binary_ebuild_location; + typedef Name<struct builddir_name> builddir; + typedef Name<struct clearenv_name> clearenv; + typedef Name<struct commands_name> commands; + typedef Name<struct config_protect_name> config_protect; + typedef Name<struct config_protect_mask_name> config_protect_mask; + typedef Name<struct destination_repository_name> destination_repository; + typedef Name<struct distdir_name> distdir; + typedef Name<struct ebuild_dir_name> ebuild_dir; + typedef Name<struct ebuild_file_name> ebuild_file; + typedef Name<struct eclassdirs_name> eclassdirs; + typedef Name<struct environment_name> environment; + typedef Name<struct environment_file_name> environment_file; + typedef Name<struct exlibsdirs_name> exlibsdirs; + typedef Name<struct expand_vars_name> expand_vars; + typedef Name<struct files_dir_name> files_dir; + typedef Name<struct image_name> image; + typedef Name<struct info_vars_name> info_vars; + typedef Name<struct load_environment_name> load_environment; + typedef Name<struct loadsaveenv_dir_name> loadsaveenv_dir; + typedef Name<struct maybe_output_manager_name> maybe_output_manager; + typedef Name<struct merger_options_name> merger_options; + typedef Name<struct output_directory_name> output_directory; + typedef Name<struct package_builddir_name> package_builddir; + typedef Name<struct package_id_name> package_id; + typedef Name<struct portdir_name> portdir; + typedef Name<struct profiles_name> profiles; + typedef Name<struct profiles_with_parents_name> profiles_with_parents; + typedef Name<struct replaced_by_name> replaced_by; + typedef Name<struct replacing_ids_name> replacing_ids; + typedef Name<struct root_name> root; + typedef Name<struct sandbox_name> sandbox; + typedef Name<struct sydbox_name> sydbox; + typedef Name<struct slot_name> slot; + typedef Name<struct unmerge_only_name> unmerge_only; + typedef Name<struct unmet_requirements_name> unmet_requirements; + typedef Name<struct use_name> use; + typedef Name<struct use_ebuild_file_name> use_ebuild_file; + typedef Name<struct use_expand_name> use_expand; + typedef Name<struct use_expand_hidden_name> use_expand_hidden; + typedef Name<struct userpriv_name> userpriv; } namespace erepository diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc index df0d21786..82b5013b0 100644 --- a/paludis/repositories/e/ebuild_id.cc +++ b/paludis/repositories/e/ebuild_id.cc @@ -250,26 +250,26 @@ EbuildID::need_keys_added() const + (count == 0 ? "no" : stringify(count)) + " ebuild variable phases but expected exactly one"); EbuildMetadataCommand cmd(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->repository->params().builddir()), - value_for<n::clearenv>(phases.begin_phases()->option("clearenv")), - value_for<n::commands>(join(phases.begin_phases()->begin_commands(), phases.begin_phases()->end_commands(), " ")), - value_for<n::distdir>(_imp->repository->params().distdir()), - value_for<n::ebuild_dir>(_imp->repository->layout()->package_directory(name())), - value_for<n::ebuild_file>(_imp->ebuild), - value_for<n::eclassdirs>(_imp->repository->params().eclassdirs()), - value_for<n::environment>(_imp->environment), - value_for<n::exlibsdirs>(_imp->repository->layout()->exlibsdirs(name())), - value_for<n::files_dir>(_imp->repository->layout()->package_directory(name()) / "files"), - value_for<n::maybe_output_manager>(make_null_shared_ptr()), - value_for<n::package_builddir>(_imp->repository->params().builddir() / (stringify(name().category()) + "-" + stringify(name().package()) + "-" + stringify(version()) + "-metadata")), - value_for<n::package_id>(shared_from_this()), - value_for<n::portdir>( + n::builddir() = _imp->repository->params().builddir(), + n::clearenv() = phases.begin_phases()->option("clearenv"), + n::commands() = join(phases.begin_phases()->begin_commands(), phases.begin_phases()->end_commands(), " "), + n::distdir() = _imp->repository->params().distdir(), + n::ebuild_dir() = _imp->repository->layout()->package_directory(name()), + n::ebuild_file() = _imp->ebuild, + n::eclassdirs() = _imp->repository->params().eclassdirs(), + n::environment() = _imp->environment, + n::exlibsdirs() = _imp->repository->layout()->exlibsdirs(name()), + n::files_dir() = _imp->repository->layout()->package_directory(name()) / "files", + n::maybe_output_manager() = make_null_shared_ptr(), + n::package_builddir() = _imp->repository->params().builddir() / (stringify(name().category()) + "-" + stringify(name().package()) + "-" + stringify(version()) + "-metadata"), + n::package_id() = shared_from_this(), + n::portdir() = (_imp->repository->params().master_repositories() && ! _imp->repository->params().master_repositories()->empty()) ? - (*_imp->repository->params().master_repositories()->begin())->params().location() : _imp->repository->params().location()), - value_for<n::root>("/"), - value_for<n::sandbox>(phases.begin_phases()->option("sandbox")), - value_for<n::sydbox>(phases.begin_phases()->option("sydbox")), - value_for<n::userpriv>(phases.begin_phases()->option("userpriv")) + (*_imp->repository->params().master_repositories()->begin())->params().location() : _imp->repository->params().location(), + n::root() = "/", + n::sandbox() = phases.begin_phases()->option("sandbox"), + n::sydbox() = phases.begin_phases()->option("sydbox"), + n::userpriv() = phases.begin_phases()->option("userpriv") )); if (! cmd()) @@ -485,10 +485,10 @@ EbuildID::need_masks_added() const { add_overridden_mask(make_shared_ptr(new OverriddenMask( make_named_values<OverriddenMask>( - value_for<n::mask>(make_shared_ptr(new EUnacceptedMask('~', + n::mask() = make_shared_ptr(new EUnacceptedMask('~', DistributionData::get_instance()->distribution_from_string( - _imp->environment->distribution())->concept_keyword() + " (unstable accepted)", keywords_key()))), - value_for<n::override_reason>(mro_accepted_unstable) + _imp->environment->distribution())->concept_keyword() + " (unstable accepted)", keywords_key())), + n::override_reason() = mro_accepted_unstable )))); } } @@ -524,16 +524,16 @@ EbuildID::need_masks_added() const if (_imp->repository_mask->value()) add_overridden_mask(make_shared_ptr(new OverriddenMask( make_named_values<OverriddenMask>( - value_for<n::mask>(make_shared_ptr(new ERepositoryMask('r', "repository (overridden)", _imp->repository_mask))), - value_for<n::override_reason>(mro_overridden_by_user) + n::mask() = make_shared_ptr(new ERepositoryMask('r', "repository (overridden)", _imp->repository_mask)), + n::override_reason() = mro_overridden_by_user )))); /* profile unless user */ if (_imp->profile_mask->value()) add_overridden_mask(make_shared_ptr(new OverriddenMask( make_named_values<OverriddenMask>( - value_for<n::mask>(make_shared_ptr(new ERepositoryMask('p', "profile (overridden)", _imp->profile_mask))), - value_for<n::override_reason>(mro_overridden_by_user) + n::mask() = make_shared_ptr(new ERepositoryMask('p', "profile (overridden)", _imp->profile_mask)), + n::override_reason() = mro_overridden_by_user )))); /* user */ @@ -541,8 +541,8 @@ EbuildID::need_masks_added() const if (user_mask) add_overridden_mask(make_shared_ptr(new OverriddenMask( make_named_values<OverriddenMask>( - value_for<n::mask>(user_mask), - value_for<n::override_reason>(mro_overridden_by_user) + n::mask() = user_mask, + n::override_reason() = mro_overridden_by_user )))); } @@ -1364,13 +1364,13 @@ EbuildID::add_build_options(const std::tr1::shared_ptr<Choices> & choices) const if (eapi()->supported()) { std::tr1::shared_ptr<Choice> build_options(new Choice(make_named_values<ChoiceParams>( - value_for<n::consider_added_or_changed>(false), - value_for<n::contains_every_value>(false), - value_for<n::hidden>(false), - value_for<n::human_name>(canonical_build_options_human_name()), - value_for<n::prefix>(canonical_build_options_prefix()), - value_for<n::raw_name>(canonical_build_options_raw_name()), - value_for<n::show_with_no_prefix>(false) + n::consider_added_or_changed() = false, + n::contains_every_value() = false, + n::hidden() = false, + n::human_name() = canonical_build_options_human_name(), + n::prefix() = canonical_build_options_prefix(), + n::raw_name() = canonical_build_options_raw_name(), + n::show_with_no_prefix() = false ))); choices->add(build_options); diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc index ca8338402..a9613c7b7 100644 --- a/paludis/repositories/e/exheres_profile.cc +++ b/paludis/repositories/e/exheres_profile.cc @@ -100,9 +100,9 @@ namespace paludis repository(p), profiles_with_parents(new FSEntrySequence), options_conf(make_named_values<PaludisLikeOptionsConfParams>( - value_for<n::allow_locking>(true), - value_for<n::environment>(e), - value_for<n::make_config_file>(&make_config_file) + n::allow_locking() = true, + n::environment() = e, + n::make_config_file() = &make_config_file )), package_mask_file(p), packages_file(p), diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc index 1710d6e86..8a6fcc053 100644 --- a/paludis/repositories/e/exndbam_repository.cc +++ b/paludis/repositories/e/exndbam_repository.cc @@ -97,18 +97,18 @@ namespace paludis ExndbamRepository::ExndbamRepository(const RepositoryName & n, const ExndbamRepositoryParams & p) : EInstalledRepository( make_named_values<EInstalledRepositoryParams>( - value_for<n::builddir>(p.builddir()), - value_for<n::environment>(p.environment()), - value_for<n::root>(p.root()) + n::builddir() = p.builddir(), + n::environment() = p.environment(), + n::root() = p.root() ), n, make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(this), - value_for<n::environment_variable_interface>(this), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = this, + n::environment_variable_interface() = this, + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), PrivateImplementationPattern<ExndbamRepository>(new Implementation<ExndbamRepository>(p)), _imp(PrivateImplementationPattern<ExndbamRepository>::_imp) @@ -164,11 +164,11 @@ ExndbamRepository::repository_factory_create( return std::tr1::shared_ptr<Repository>(new ExndbamRepository( RepositoryName(name), make_named_values<ExndbamRepositoryParams>( - value_for<n::builddir>(builddir), - value_for<n::eapi_when_unknown>(eapi_when_unknown), - value_for<n::environment>(env), - value_for<n::location>(location), - value_for<n::root>(root) + n::builddir() = builddir, + n::eapi_when_unknown() = eapi_when_unknown, + n::environment() = env, + n::location() = location, + n::root() = root ) )); } @@ -374,11 +374,11 @@ ExndbamRepository::merge(const MergeParams & m) WriteVDBEntryCommand write_vdb_entry_command( make_named_values<WriteVDBEntryParams>( - value_for<n::environment>(_imp->params.environment()), - value_for<n::environment_file>(m.environment_file()), - value_for<n::maybe_output_manager>(m.output_manager()), - value_for<n::output_directory>(target_ver_dir), - value_for<n::package_id>(std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id())) + n::environment() = _imp->params.environment(), + n::environment_file() = m.environment_file(), + n::maybe_output_manager() = m.output_manager(), + n::output_directory() = target_ver_dir, + n::package_id() = std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id()) )); write_vdb_entry_command(); @@ -410,19 +410,19 @@ ExndbamRepository::merge(const MergeParams & m) NDBAMMerger merger( make_named_values<NDBAMMergerParams>( - value_for<n::config_protect>(config_protect), - value_for<n::config_protect_mask>(config_protect_mask), - value_for<n::contents_file>(target_ver_dir / "contents"), - value_for<n::environment>(_imp->params.environment()), - value_for<n::fix_mtimes_before>(fix_mtimes ? m.build_start_time() : Timestamp(0, 0)), - value_for<n::get_new_ids_or_minus_one>(std::tr1::bind(&get_new_ids_or_minus_one, _imp->params.environment(), std::tr1::placeholders::_1)), - value_for<n::image>(m.image_dir()), - value_for<n::install_under>(FSEntry("/")), - value_for<n::merged_entries>(m.merged_entries()), - value_for<n::options>(m.options()), - value_for<n::output_manager>(m.output_manager()), - value_for<n::package_id>(m.package_id()), - value_for<n::root>(installed_root_key()->value()) + n::config_protect() = config_protect, + n::config_protect_mask() = config_protect_mask, + n::contents_file() = target_ver_dir / "contents", + n::environment() = _imp->params.environment(), + n::fix_mtimes_before() = fix_mtimes ? m.build_start_time() : Timestamp(0, 0), + n::get_new_ids_or_minus_one() = std::tr1::bind(&get_new_ids_or_minus_one, _imp->params.environment(), std::tr1::placeholders::_1), + n::image() = m.image_dir(), + n::install_under() = FSEntry("/"), + n::merged_entries() = m.merged_entries(), + n::options() = m.options(), + n::output_manager() = m.output_manager(), + n::package_id() = m.package_id(), + n::root() = installed_root_key()->value() )); (m.used_this_for_config_protect())(config_protect); @@ -443,12 +443,12 @@ ExndbamRepository::merge(const MergeParams & m) if (if_overwritten_id) { UninstallActionOptions uo(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(config_protect), - value_for<n::if_for_install_id>(m.package_id()), - value_for<n::ignore_for_unmerge>(std::tr1::bind(&ignore_merged, m.merged_entries(), - std::tr1::placeholders::_1)), - value_for<n::is_overwrite>(true), - value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1)) + n::config_protect() = config_protect, + n::if_for_install_id() = m.package_id(), + n::ignore_for_unmerge() = std::tr1::bind(&ignore_merged, m.merged_entries(), + std::tr1::placeholders::_1), + n::is_overwrite() = true, + n::make_output_manager() = std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1) )); m.perform_uninstall()(if_overwritten_id, uo); } @@ -464,12 +464,12 @@ ExndbamRepository::merge(const MergeParams & m) if (candidate != if_overwritten_id && candidate->fs_location_key()->value() != target_ver_dir && slot_is_same(candidate, m.package_id())) { UninstallActionOptions uo(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(config_protect), - value_for<n::if_for_install_id>(m.package_id()), - value_for<n::ignore_for_unmerge>(std::tr1::bind(&ignore_merged, m.merged_entries(), - std::tr1::placeholders::_1)), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1)) + n::config_protect() = config_protect, + n::if_for_install_id() = m.package_id(), + n::ignore_for_unmerge() = std::tr1::bind(&ignore_merged, m.merged_entries(), + std::tr1::placeholders::_1), + n::is_overwrite() = false, + n::make_output_manager() = std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1) )); m.perform_uninstall()(candidate, uo); } @@ -478,7 +478,7 @@ ExndbamRepository::merge(const MergeParams & m) VDBPostMergeUnmergeCommand post_merge_command( make_named_values<VDBPostMergeUnmergeCommandParams>( - value_for<n::root>(installed_root_key()->value()) + n::root() = installed_root_key()->value() )); post_merge_command(); } @@ -543,22 +543,22 @@ ExndbamRepository::perform_uninstall( /* unmerge */ NDBAMUnmerger unmerger( make_named_values<NDBAMUnmergerOptions>( - value_for<n::config_protect>(final_config_protect), - value_for<n::config_protect_mask>(config_protect_mask), - value_for<n::contents_file>(ver_dir / "contents"), - value_for<n::environment>(_imp->params.environment()), - value_for<n::ignore>(a.options.ignore_for_unmerge()), - value_for<n::ndbam>(&_imp->ndbam), - value_for<n::output_manager>(output_manager), - value_for<n::package_id>(id), - value_for<n::root>(installed_root_key()->value()) + n::config_protect() = final_config_protect, + n::config_protect_mask() = config_protect_mask, + n::contents_file() = ver_dir / "contents", + n::environment() = _imp->params.environment(), + n::ignore() = a.options.ignore_for_unmerge(), + n::ndbam() = &_imp->ndbam, + n::output_manager() = output_manager, + n::package_id() = id, + n::root() = installed_root_key()->value() )); unmerger.unmerge(); VDBPostMergeUnmergeCommand post_unmerge_command( make_named_values<VDBPostMergeUnmergeCommandParams>( - value_for<n::root>(installed_root_key()->value()) + n::root() = installed_root_key()->value() )); post_unmerge_command(); } @@ -567,32 +567,32 @@ ExndbamRepository::perform_uninstall( FSEntry package_builddir(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-uninstall")); EbuildCommandParams params( make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(ver_dir), - value_for<n::ebuild_dir>(ver_dir), - value_for<n::ebuild_file>(ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild")), - value_for<n::eclassdirs>(eclassdirs), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)), - value_for<n::files_dir>(ver_dir), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(package_builddir), - value_for<n::package_id>(id), - value_for<n::portdir>(_imp->params.location()), - value_for<n::root>(stringify(_imp->params.root())), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv")) + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = ver_dir, + n::ebuild_dir() = ver_dir, + n::ebuild_file() = ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild"), + n::eclassdirs() = eclassdirs, + n::environment() = _imp->params.environment(), + n::exlibsdirs() = make_shared_ptr(new FSEntrySequence), + n::files_dir() = ver_dir, + n::maybe_output_manager() = output_manager, + n::package_builddir() = package_builddir, + n::package_id() = id, + n::portdir() = _imp->params.location(), + n::root() = stringify(_imp->params.root()), + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") )); EbuildUninstallCommandParams uninstall_params( make_named_values<EbuildUninstallCommandParams>( - value_for<n::load_environment>(load_env.get()), - value_for<n::loadsaveenv_dir>(package_builddir / "temp"), - value_for<n::replaced_by>(a.options.if_for_install_id()), - value_for<n::unmerge_only>(false) + n::load_environment() = load_env.get(), + n::loadsaveenv_dir() = package_builddir / "temp", + n::replaced_by() = a.options.if_for_install_id(), + n::unmerge_only() = false )); EbuildUninstallCommand uninstall_cmd_pre(params, uninstall_params); diff --git a/paludis/repositories/e/exndbam_repository.hh b/paludis/repositories/e/exndbam_repository.hh index fea14ee64..5892e3f49 100644 --- a/paludis/repositories/e/exndbam_repository.hh +++ b/paludis/repositories/e/exndbam_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -31,11 +31,11 @@ namespace paludis { namespace n { - struct builddir; - struct eapi_when_unknown; - struct environment; - struct location; - struct root; + typedef Name<struct builddir_name> builddir; + typedef Name<struct eapi_when_unknown_name> eapi_when_unknown; + typedef Name<struct environment_name> environment; + typedef Name<struct location_name> location; + typedef Name<struct root_name> root; } namespace erepository diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc index a4c4fb01a..1bfd568fd 100644 --- a/paludis/repositories/e/exndbam_repository_TEST.cc +++ b/paludis/repositories/e/exndbam_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -111,11 +111,11 @@ namespace test_cases PackageDepSpec(parse_user_package_dep_spec(victim, &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin()); InstallAction install_action(make_named_values<InstallActionOptions>( - value_for<n::destination>(exndbam_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&do_uninstall), - value_for<n::replacing>(replacing), - value_for<n::want_phase>(&want_all_phases) + n::destination() = exndbam_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &do_uninstall, + n::replacing() = replacing, + n::want_phase() = &want_all_phases )); (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(chosen_one, diff --git a/paludis/repositories/e/extra_distribution_data.cc b/paludis/repositories/e/extra_distribution_data.cc index dcc0c78fb..e180b53d4 100644 --- a/paludis/repositories/e/extra_distribution_data.cc +++ b/paludis/repositories/e/extra_distribution_data.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -51,23 +51,23 @@ namespace paludis static std::tr1::shared_ptr<EDistribution> make_data(const std::tr1::shared_ptr<const KeyValueConfigFile> & k) { return make_shared_ptr(new EDistribution(make_named_values<EDistribution>( - value_for<n::default_buildroot>(k->get("default_buildroot")), - value_for<n::default_distdir>(k->get("default_distdir")), - value_for<n::default_eapi_when_unknown>(k->get("default_eapi_when_unknown")), - value_for<n::default_eapi_when_unspecified>(k->get("default_eapi_when_unspecified")), - value_for<n::default_layout>(k->get("default_layout")), - value_for<n::default_names_cache>(k->get("default_names_cache")), - value_for<n::default_profile_eapi>(k->get("default_profile_eapi")), - value_for<n::default_profile_layout>(k->get("default_profile_layout")), - value_for<n::default_provides_cache>(k->get("default_provides_cache")), - value_for<n::default_write_cache>(k->get("default_write_cache")), - value_for<n::news_directory>(FSEntry(k->get("news_directory"))), - value_for<n::qa_category_dir_checks>(make_set(k->get("qa_category_dir_checks"))), - value_for<n::qa_eclass_file_contents_checks>(make_set(k->get("qa_eclass_file_contents_checks"))), - value_for<n::qa_package_dir_checks>(make_set(k->get("qa_package_dir_checks"))), - value_for<n::qa_package_id_checks>(make_set(k->get("qa_package_id_checks"))), - value_for<n::qa_package_id_file_contents_checks>(make_set(k->get("qa_package_id_file_contents_checks"))), - value_for<n::qa_tree_checks>(make_set(k->get("qa_tree_checks"))) + n::default_buildroot() = k->get("default_buildroot"), + n::default_distdir() = k->get("default_distdir"), + n::default_eapi_when_unknown() = k->get("default_eapi_when_unknown"), + n::default_eapi_when_unspecified() = k->get("default_eapi_when_unspecified"), + n::default_layout() = k->get("default_layout"), + n::default_names_cache() = k->get("default_names_cache"), + n::default_profile_eapi() = k->get("default_profile_eapi"), + n::default_profile_layout() = k->get("default_profile_layout"), + n::default_provides_cache() = k->get("default_provides_cache"), + n::default_write_cache() = k->get("default_write_cache"), + n::news_directory() = FSEntry(k->get("news_directory")), + n::qa_category_dir_checks() = make_set(k->get("qa_category_dir_checks")), + n::qa_eclass_file_contents_checks() = make_set(k->get("qa_eclass_file_contents_checks")), + n::qa_package_dir_checks() = make_set(k->get("qa_package_dir_checks")), + n::qa_package_id_checks() = make_set(k->get("qa_package_id_checks")), + n::qa_package_id_file_contents_checks() = make_set(k->get("qa_package_id_file_contents_checks")), + n::qa_tree_checks() = make_set(k->get("qa_tree_checks")) ))); } }; diff --git a/paludis/repositories/e/extra_distribution_data.hh b/paludis/repositories/e/extra_distribution_data.hh index 52deee2a0..b6537d54f 100644 --- a/paludis/repositories/e/extra_distribution_data.hh +++ b/paludis/repositories/e/extra_distribution_data.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -31,23 +31,23 @@ namespace paludis { namespace n { - struct default_buildroot; - struct default_distdir; - struct default_eapi_when_unknown; - struct default_eapi_when_unspecified; - struct default_layout; - struct default_names_cache; - struct default_profile_eapi; - struct default_profile_layout; - struct default_provides_cache; - struct default_write_cache; - struct news_directory; - struct qa_category_dir_checks; - struct qa_eclass_file_contents_checks; - struct qa_package_dir_checks; - struct qa_package_id_checks; - struct qa_package_id_file_contents_checks; - struct qa_tree_checks; + typedef Name<struct default_buildroot_name> default_buildroot; + typedef Name<struct default_distdir_name> default_distdir; + typedef Name<struct default_eapi_when_unknown_name> default_eapi_when_unknown; + typedef Name<struct default_eapi_when_unspecified_name> default_eapi_when_unspecified; + typedef Name<struct default_layout_name> default_layout; + typedef Name<struct default_names_cache_name> default_names_cache; + typedef Name<struct default_profile_eapi_name> default_profile_eapi; + typedef Name<struct default_profile_layout_name> default_profile_layout; + typedef Name<struct default_provides_cache_name> default_provides_cache; + typedef Name<struct default_write_cache_name> default_write_cache; + typedef Name<struct news_directory_name> news_directory; + typedef Name<struct qa_category_dir_checks_name> qa_category_dir_checks; + typedef Name<struct qa_eclass_file_contents_checks_name> qa_eclass_file_contents_checks; + typedef Name<struct qa_package_dir_checks_name> qa_package_dir_checks; + typedef Name<struct qa_package_id_checks_name> qa_package_id_checks; + typedef Name<struct qa_package_id_file_contents_checks_name> qa_package_id_file_contents_checks; + typedef Name<struct qa_tree_checks_name> qa_tree_checks; } namespace erepository diff --git a/paludis/repositories/e/fetch_visitor_TEST.cc b/paludis/repositories/e/fetch_visitor_TEST.cc index c92a148d5..0f9a08196 100644 --- a/paludis/repositories/e/fetch_visitor_TEST.cc +++ b/paludis/repositories/e/fetch_visitor_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -66,8 +66,8 @@ namespace test_cases { TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); diff --git a/paludis/repositories/e/fix_locked_dependencies_TEST.cc b/paludis/repositories/e/fix_locked_dependencies_TEST.cc index 4a7891264..7a27cb22f 100644 --- a/paludis/repositories/e/fix_locked_dependencies_TEST.cc +++ b/paludis/repositories/e/fix_locked_dependencies_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -45,18 +45,18 @@ namespace test_cases { TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1")); std::tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); env.package_database()->add_repository(2, installed_repo); installed_repo->add_version("cat", "installed", "1")->set_slot(SlotName("monkey")); diff --git a/paludis/repositories/e/glsa.hh b/paludis/repositories/e/glsa.hh index a3fd2ddf1..386047927 100644 --- a/paludis/repositories/e/glsa.hh +++ b/paludis/repositories/e/glsa.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, 2010 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 @@ -32,9 +32,9 @@ namespace paludis { namespace n { - struct op; - struct slot; - struct version; + typedef Name<struct op_name> op; + typedef Name<struct slot_name> slot; + typedef Name<struct version_name> version; } namespace erepository diff --git a/paludis/repositories/e/manifest2_reader.cc b/paludis/repositories/e/manifest2_reader.cc index 560b458db..3195de581 100644 --- a/paludis/repositories/e/manifest2_reader.cc +++ b/paludis/repositories/e/manifest2_reader.cc @@ -127,13 +127,13 @@ Manifest2Reader::Manifest2Reader(const FSEntry & f) : } _imp->entries.insert(std::make_pair(std::make_pair(type,name), make_named_values<Manifest2Entry>( - value_for<n::md5>(md5), - value_for<n::name>(name), - value_for<n::rmd160>(rmd160), - value_for<n::sha1>(sha1), - value_for<n::sha256>(sha256), - value_for<n::size>(size), - value_for<n::type>(type) + n::md5() = md5, + n::name() = name, + n::rmd160() = rmd160, + n::sha1() = sha1, + n::sha256() = sha256, + n::size() = size, + n::type() = type ))); } } diff --git a/paludis/repositories/e/manifest2_reader.hh b/paludis/repositories/e/manifest2_reader.hh index 239326b14..803a7902b 100644 --- a/paludis/repositories/e/manifest2_reader.hh +++ b/paludis/repositories/e/manifest2_reader.hh @@ -36,13 +36,13 @@ namespace paludis { namespace n { - struct md5; - struct name; - struct rmd160; - struct sha1; - struct sha256; - struct size; - struct type; + typedef Name<struct md5_name> md5; + typedef Name<struct name_name> name; + typedef Name<struct rmd160_name> rmd160; + typedef Name<struct sha1_name> sha1; + typedef Name<struct sha256_name> sha256; + typedef Name<struct size_name> size; + typedef Name<struct type_name> type; } namespace erepository diff --git a/paludis/repositories/e/metadata_xml.hh b/paludis/repositories/e/metadata_xml.hh index 0558f5887..5c6980e53 100644 --- a/paludis/repositories/e/metadata_xml.hh +++ b/paludis/repositories/e/metadata_xml.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008 Ciaran McCreesh + * Copyright (c) 2008, 2010 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 @@ -34,10 +34,10 @@ namespace paludis { namespace n { - struct herds; - struct long_description; - struct maintainers; - struct uses; + typedef Name<struct herds_name> herds; + typedef Name<struct long_description_name> long_description; + typedef Name<struct maintainers_name> maintainers; + typedef Name<struct uses_name> uses; } namespace erepository diff --git a/paludis/repositories/e/source_uri_finder_TEST.cc b/paludis/repositories/e/source_uri_finder_TEST.cc index bec0d8c75..2a41f1f6b 100644 --- a/paludis/repositories/e/source_uri_finder_TEST.cc +++ b/paludis/repositories/e/source_uri_finder_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -55,8 +55,8 @@ namespace test_cases { TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); @@ -85,8 +85,8 @@ namespace test_cases { TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); env.package_database()->add_repository(1, repo); diff --git a/paludis/repositories/e/vdb_merger.cc b/paludis/repositories/e/vdb_merger.cc index 76c707de9..4ab1ee7c8 100644 --- a/paludis/repositories/e/vdb_merger.cc +++ b/paludis/repositories/e/vdb_merger.cc @@ -81,15 +81,15 @@ namespace VDBMerger::VDBMerger(const VDBMergerParams & p) : Merger(make_named_values<MergerParams>( - value_for<n::environment>(p.environment()), - value_for<n::fix_mtimes_before>(p.fix_mtimes_before()), - value_for<n::get_new_ids_or_minus_one>(std::tr1::bind(&get_new_ids_or_minus_one, p.environment(), std::tr1::placeholders::_1)), - value_for<n::image>(p.image()), - value_for<n::install_under>(FSEntry("/")), - value_for<n::merged_entries>(p.merged_entries()), - value_for<n::no_chown>(! getenv_with_default("PALUDIS_NO_CHOWN", "").empty()), - value_for<n::options>(p.options()), - value_for<n::root>(p.root()) + n::environment() = p.environment(), + n::fix_mtimes_before() = p.fix_mtimes_before(), + n::get_new_ids_or_minus_one() = std::tr1::bind(&get_new_ids_or_minus_one, p.environment(), std::tr1::placeholders::_1), + n::image() = p.image(), + n::install_under() = FSEntry("/"), + n::merged_entries() = p.merged_entries(), + n::no_chown() = ! getenv_with_default("PALUDIS_NO_CHOWN", "").empty(), + n::options() = p.options(), + n::root() = p.root() )), PrivateImplementationPattern<VDBMerger>(new Implementation<VDBMerger>(p)), _imp(PrivateImplementationPattern<VDBMerger>::_imp) diff --git a/paludis/repositories/e/vdb_merger.hh b/paludis/repositories/e/vdb_merger.hh index 16b0f522a..4f3778edc 100644 --- a/paludis/repositories/e/vdb_merger.hh +++ b/paludis/repositories/e/vdb_merger.hh @@ -31,16 +31,16 @@ namespace paludis namespace n { - struct config_protect; - struct config_protect_mask; - struct contents_file; - struct environment; - struct image; - struct merged_entries; - struct options; - struct output_manager; - struct package_id; - struct root; + typedef Name<struct config_protect_name> config_protect; + typedef Name<struct config_protect_mask_name> config_protect_mask; + typedef Name<struct contents_file_name> contents_file; + typedef Name<struct environment_name> environment; + typedef Name<struct image_name> image; + typedef Name<struct merged_entries_name> merged_entries; + typedef Name<struct options_name> options; + typedef Name<struct output_manager_name> output_manager; + typedef Name<struct package_id_name> package_id; + typedef Name<struct root_name> root; } /** diff --git a/paludis/repositories/e/vdb_merger_TEST.cc b/paludis/repositories/e/vdb_merger_TEST.cc index eb9789a6c..f6ac2ea94 100644 --- a/paludis/repositories/e/vdb_merger_TEST.cc +++ b/paludis/repositories/e/vdb_merger_TEST.cc @@ -80,17 +80,17 @@ namespace root_dir(FSEntry::cwd() / "vdb_merger_TEST_dir" / what / "root"), target(what), merger(make_named_values<VDBMergerParams>( - value_for<n::config_protect>("/protected_file /protected_dir"), - value_for<n::config_protect_mask>("/protected_dir/unprotected_file /protected_dir/unprotected_dir"), - value_for<n::contents_file>(FSEntry::cwd() / "vdb_merger_TEST_dir/CONTENTS" / what), - value_for<n::environment>(&env), - value_for<n::fix_mtimes_before>(Timestamp(0, 0)), - value_for<n::image>(FSEntry::cwd() / "vdb_merger_TEST_dir" / what / "image"), - value_for<n::merged_entries>(make_shared_ptr(new FSEntrySet)), - value_for<n::options>(MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs), - value_for<n::output_manager>(make_shared_ptr(new StandardOutputManager)), - value_for<n::package_id>(std::tr1::shared_ptr<PackageID>()), - value_for<n::root>(root_dir) + n::config_protect() = "/protected_file /protected_dir", + n::config_protect_mask() = "/protected_dir/unprotected_file /protected_dir/unprotected_dir", + n::contents_file() = FSEntry::cwd() / "vdb_merger_TEST_dir/CONTENTS" / what, + n::environment() = &env, + n::fix_mtimes_before() = Timestamp(0, 0), + n::image() = FSEntry::cwd() / "vdb_merger_TEST_dir" / what / "image", + n::merged_entries() = make_shared_ptr(new FSEntrySet), + n::options() = MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs, + n::output_manager() = make_shared_ptr(new StandardOutputManager), + n::package_id() = std::tr1::shared_ptr<PackageID>(), + n::root() = root_dir )) { } diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc index 49d0a3eda..6b1c9b5ea 100644 --- a/paludis/repositories/e/vdb_repository.cc +++ b/paludis/repositories/e/vdb_repository.cc @@ -164,18 +164,18 @@ namespace paludis VDBRepository::VDBRepository(const VDBRepositoryParams & p) : EInstalledRepository( make_named_values<EInstalledRepositoryParams>( - value_for<n::builddir>(p.builddir()), - value_for<n::environment>(p.environment()), - value_for<n::root>(p.root()) + n::builddir() = p.builddir(), + n::environment() = p.environment(), + n::root() = p.root() ), p.name(), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(this), - value_for<n::environment_variable_interface>(this), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(this), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = this, + n::environment_variable_interface() = this, + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = this, + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), PrivateImplementationPattern<VDBRepository>(new Implementation<VDBRepository>(this, p)), _imp(PrivateImplementationPattern<VDBRepository>::_imp) @@ -352,14 +352,14 @@ VDBRepository::repository_factory_create( env->distribution()))->default_eapi_when_unknown(); return std::tr1::shared_ptr<Repository>(new VDBRepository(make_named_values<VDBRepositoryParams>( - value_for<n::builddir>(builddir), - value_for<n::eapi_when_unknown>(eapi_when_unknown), - value_for<n::environment>(env), - value_for<n::location>(location), - value_for<n::name>(RepositoryName(name)), - value_for<n::names_cache>(names_cache), - value_for<n::provides_cache>(provides_cache), - value_for<n::root>(root) + n::builddir() = builddir, + n::eapi_when_unknown() = eapi_when_unknown, + n::environment() = env, + n::location() = location, + n::name() = RepositoryName(name), + n::names_cache() = names_cache, + n::provides_cache() = provides_cache, + n::root() = root ))); } @@ -468,19 +468,19 @@ VDBRepository::perform_uninstall( /* unmerge */ VDBUnmerger unmerger( make_named_values<VDBUnmergerOptions>( - value_for<n::config_protect>(final_config_protect), - value_for<n::config_protect_mask>(config_protect_mask), - value_for<n::environment>(_imp->params.environment()), - value_for<n::ignore>(a.options.ignore_for_unmerge()), - value_for<n::output_manager>(output_manager), - value_for<n::package_id>(id), - value_for<n::root>(installed_root_key()->value()) + n::config_protect() = final_config_protect, + n::config_protect_mask() = config_protect_mask, + n::environment() = _imp->params.environment(), + n::ignore() = a.options.ignore_for_unmerge(), + n::output_manager() = output_manager, + n::package_id() = id, + n::root() = installed_root_key()->value() )); unmerger.unmerge(); VDBPostMergeUnmergeCommand post_unmerge_command( make_named_values<VDBPostMergeUnmergeCommandParams>( - value_for<n::root>(installed_root_key()->value()) + n::root() = installed_root_key()->value() )); post_unmerge_command(); } @@ -488,31 +488,31 @@ VDBRepository::perform_uninstall( { FSEntry package_builddir(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-uninstall")); EbuildCommandParams params(make_named_values<EbuildCommandParams>( - value_for<n::builddir>(_imp->params.builddir()), - value_for<n::clearenv>(phase->option("clearenv")), - value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")), - value_for<n::distdir>(pkg_dir), - value_for<n::ebuild_dir>(pkg_dir), - value_for<n::ebuild_file>(pkg_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild")), - value_for<n::eclassdirs>(eclassdirs), - value_for<n::environment>(_imp->params.environment()), - value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)), - value_for<n::files_dir>(pkg_dir), - value_for<n::maybe_output_manager>(output_manager), - value_for<n::package_builddir>(package_builddir), - value_for<n::package_id>(id), - value_for<n::portdir>(_imp->params.location()), - value_for<n::root>(stringify(_imp->params.root())), - value_for<n::sandbox>(phase->option("sandbox")), - value_for<n::sydbox>(phase->option("sydbox")), - value_for<n::userpriv>(phase->option("userpriv")) + n::builddir() = _imp->params.builddir(), + n::clearenv() = phase->option("clearenv"), + n::commands() = join(phase->begin_commands(), phase->end_commands(), " "), + n::distdir() = pkg_dir, + n::ebuild_dir() = pkg_dir, + n::ebuild_file() = pkg_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild"), + n::eclassdirs() = eclassdirs, + n::environment() = _imp->params.environment(), + n::exlibsdirs() = make_shared_ptr(new FSEntrySequence), + n::files_dir() = pkg_dir, + n::maybe_output_manager() = output_manager, + n::package_builddir() = package_builddir, + n::package_id() = id, + n::portdir() = _imp->params.location(), + n::root() = stringify(_imp->params.root()), + n::sandbox() = phase->option("sandbox"), + n::sydbox() = phase->option("sydbox"), + n::userpriv() = phase->option("userpriv") )); EbuildUninstallCommandParams uninstall_params(make_named_values<EbuildUninstallCommandParams>( - value_for<n::load_environment>(load_env.get()), - value_for<n::loadsaveenv_dir>(package_builddir / "temp"), - value_for<n::replaced_by>(a.options.if_for_install_id()), - value_for<n::unmerge_only>(false) + n::load_environment() = load_env.get(), + n::loadsaveenv_dir() = package_builddir / "temp", + n::replaced_by() = a.options.if_for_install_id(), + n::unmerge_only() = false )); EbuildUninstallCommand uninstall_cmd_pre(params, uninstall_params); @@ -606,8 +606,8 @@ VDBRepository::provided_packages() const for (std::list<QualifiedPackageName>::const_iterator it2(it->second->begin()), it2_end(it->second->end()); it2_end != it2; ++it2) _imp->provides->push_back(make_named_values<RepositoryProvidesEntry>( - value_for<n::provided_by>(id), - value_for<n::virtual_name>(*it2) + n::provided_by() = id, + n::virtual_name() = *it2 )); } @@ -902,11 +902,11 @@ VDBRepository::merge(const MergeParams & m) WriteVDBEntryCommand write_vdb_entry_command( make_named_values<WriteVDBEntryParams>( - value_for<n::environment>(_imp->params.environment()), - value_for<n::environment_file>(m.environment_file()), - value_for<n::maybe_output_manager>(m.output_manager()), - value_for<n::output_directory>(tmp_vdb_dir), - value_for<n::package_id>(std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id())) + n::environment() = _imp->params.environment(), + n::environment_file() = m.environment_file(), + n::maybe_output_manager() = m.output_manager(), + n::output_directory() = tmp_vdb_dir, + n::package_id() = std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id()) )); write_vdb_entry_command(); @@ -940,17 +940,17 @@ VDBRepository::merge(const MergeParams & m) VDBMerger merger( make_named_values<VDBMergerParams>( - value_for<n::config_protect>(config_protect), - value_for<n::config_protect_mask>(config_protect_mask), - value_for<n::contents_file>(vdb_dir / "CONTENTS"), - value_for<n::environment>(_imp->params.environment()), - value_for<n::fix_mtimes_before>(fix_mtimes ? m.build_start_time() : Timestamp(0, 0)), - value_for<n::image>(m.image_dir()), - value_for<n::merged_entries>(m.merged_entries()), - value_for<n::options>(m.options()), - value_for<n::output_manager>(m.output_manager()), - value_for<n::package_id>(m.package_id()), - value_for<n::root>(installed_root_key()->value()) + n::config_protect() = config_protect, + n::config_protect_mask() = config_protect_mask, + n::contents_file() = vdb_dir / "CONTENTS", + n::environment() = _imp->params.environment(), + n::fix_mtimes_before() = fix_mtimes ? m.build_start_time() : Timestamp(0, 0), + n::image() = m.image_dir(), + n::merged_entries() = m.merged_entries(), + n::options() = m.options(), + n::output_manager() = m.output_manager(), + n::package_id() = m.package_id(), + n::root() = installed_root_key()->value() )); (m.used_this_for_config_protect())(config_protect); @@ -1003,12 +1003,12 @@ VDBRepository::merge(const MergeParams & m) if (is_replace) { UninstallActionOptions uo(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(config_protect), - value_for<n::if_for_install_id>(m.package_id()), - value_for<n::ignore_for_unmerge>(std::tr1::bind(&ignore_merged, m.merged_entries(), - std::tr1::placeholders::_1)), - value_for<n::is_overwrite>(true), - value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1)) + n::config_protect() = config_protect, + n::if_for_install_id() = m.package_id(), + n::ignore_for_unmerge() = std::tr1::bind(&ignore_merged, m.merged_entries(), + std::tr1::placeholders::_1), + n::is_overwrite() = true, + n::make_output_manager() = std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1) )); m.perform_uninstall()(is_replace, uo); } @@ -1024,12 +1024,12 @@ VDBRepository::merge(const MergeParams & m) if (candidate != is_replace && candidate != new_id && slot_is_same(candidate, m.package_id())) { UninstallActionOptions uo(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(config_protect), - value_for<n::if_for_install_id>(m.package_id()), - value_for<n::ignore_for_unmerge>(std::tr1::bind(&ignore_merged, m.merged_entries(), - std::tr1::placeholders::_1)), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1)) + n::config_protect() = config_protect, + n::if_for_install_id() = m.package_id(), + n::ignore_for_unmerge() = std::tr1::bind(&ignore_merged, m.merged_entries(), + std::tr1::placeholders::_1), + n::is_overwrite() = false, + n::make_output_manager() = std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1) )); m.perform_uninstall()(candidate, uo); } @@ -1038,7 +1038,7 @@ VDBRepository::merge(const MergeParams & m) VDBPostMergeUnmergeCommand post_merge_command( make_named_values<VDBPostMergeUnmergeCommandParams>( - value_for<n::root>(installed_root_key()->value()) + n::root() = installed_root_key()->value() )); post_merge_command(); diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh index e72edf610..df52a210e 100644 --- a/paludis/repositories/e/vdb_repository.hh +++ b/paludis/repositories/e/vdb_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -40,14 +40,14 @@ namespace paludis { namespace n { - struct builddir; - struct eapi_when_unknown; - struct environment; - struct location; - struct name; - struct names_cache; - struct provides_cache; - struct root; + typedef Name<struct builddir_name> builddir; + typedef Name<struct eapi_when_unknown_name> eapi_when_unknown; + typedef Name<struct environment_name> environment; + typedef Name<struct location_name> location; + typedef Name<struct name_name> name; + typedef Name<struct names_cache_name> names_cache; + typedef Name<struct provides_cache_name> provides_cache; + typedef Name<struct root_name> root; } namespace erepository diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc index 4f34fc865..217c34e81 100644 --- a/paludis/repositories/e/vdb_repository_TEST.cc +++ b/paludis/repositories/e/vdb_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -352,27 +352,27 @@ namespace test_cases env.package_database()->add_repository(0, vdb_repo); InstallAction install_action(make_named_values<InstallActionOptions>( - value_for<n::destination>(vdb_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&do_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = vdb_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &do_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); UninstallAction uninstall_action(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(""), - value_for<n::if_for_install_id>(make_null_shared_ptr()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(&make_standard_output_manager) + n::config_protect() = "", + n::if_for_install_id() = make_null_shared_ptr(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = &make_standard_output_manager )); InfoActionOptions info_action_options(make_named_values<InfoActionOptions>( - value_for<n::make_output_manager>(&make_standard_output_manager) + n::make_output_manager() = &make_standard_output_manager )); ConfigActionOptions config_action_options(make_named_values<ConfigActionOptions>( - value_for<n::make_output_manager>(&make_standard_output_manager) + n::make_output_manager() = &make_standard_output_manager )); InfoAction info_action(info_action_options); @@ -482,27 +482,27 @@ namespace test_cases env.package_database()->add_repository(0, vdb_repo); InstallAction install_action(make_named_values<InstallActionOptions>( - value_for<n::destination>(vdb_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&do_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = vdb_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &do_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); UninstallAction uninstall_action(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(""), - value_for<n::if_for_install_id>(make_null_shared_ptr()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(&make_standard_output_manager) + n::config_protect() = "", + n::if_for_install_id() = make_null_shared_ptr(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = &make_standard_output_manager )); InfoActionOptions info_action_options(make_named_values<InfoActionOptions>( - value_for<n::make_output_manager>(&make_standard_output_manager) + n::make_output_manager() = &make_standard_output_manager )); ConfigActionOptions config_action_options(make_named_values<ConfigActionOptions>( - value_for<n::make_output_manager>(&make_standard_output_manager) + n::make_output_manager() = &make_standard_output_manager )); InfoAction info_action(info_action_options); @@ -591,11 +591,11 @@ namespace test_cases PackageDepSpec(parse_user_package_dep_spec(victim, &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin()); InstallAction install_action(make_named_values<InstallActionOptions>( - value_for<n::destination>(vdb_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&do_uninstall), - value_for<n::replacing>(replacing), - value_for<n::want_phase>(&want_all_phases) + n::destination() = vdb_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &do_uninstall, + n::replacing() = replacing, + n::want_phase() = &want_all_phases )); (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(chosen_one, @@ -634,11 +634,11 @@ namespace test_cases env.package_database()->add_repository(0, vdb_repo); UninstallAction uninstall_action(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(""), - value_for<n::if_for_install_id>(make_null_shared_ptr()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(&make_standard_output_manager) + n::config_protect() = "", + n::if_for_install_id() = make_null_shared_ptr(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = &make_standard_output_manager )); { @@ -954,11 +954,11 @@ namespace test_cases PackageDepSpec(parse_user_package_dep_spec(victim, &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin()); InstallAction install_action(make_named_values<InstallActionOptions>( - value_for<n::destination>(vdb_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&do_uninstall), - value_for<n::replacing>(replacing), - value_for<n::want_phase>(&want_all_phases) + n::destination() = vdb_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &do_uninstall, + n::replacing() = replacing, + n::want_phase() = &want_all_phases )); (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(chosen_one, @@ -1013,11 +1013,11 @@ namespace test_cases env.package_database()->add_repository(0, vdb_repo); UninstallAction uninstall_action(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(""), - value_for<n::if_for_install_id>(make_null_shared_ptr()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(&make_standard_output_manager) + n::config_protect() = "", + n::if_for_install_id() = make_null_shared_ptr(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = &make_standard_output_manager )); TEST_CHECK_EQUAL(read_file(provides_cache), "paludis-3\ninstalled\n"); @@ -1208,11 +1208,11 @@ namespace test_cases env.package_database()->add_repository(0, vdb_repo); InstallAction install_action(make_named_values<InstallActionOptions>( - value_for<n::destination>(vdb_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&do_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = vdb_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &do_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); TEST_CHECK(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"))->empty()); @@ -1280,11 +1280,11 @@ namespace test_cases PackageDepSpec(parse_user_package_dep_spec(victim, &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin()); InstallAction install_action(make_named_values<InstallActionOptions>( - value_for<n::destination>(vdb_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&do_uninstall), - value_for<n::replacing>(replacing), - value_for<n::want_phase>(&want_all_phases) + n::destination() = vdb_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &do_uninstall, + n::replacing() = replacing, + n::want_phase() = &want_all_phases )); (*env[selection::RequireExactlyOne(generator::Matches( PackageDepSpec(parse_user_package_dep_spec(chosen_one, diff --git a/paludis/repositories/e/vdb_unmerger.cc b/paludis/repositories/e/vdb_unmerger.cc index 0ae5943b4..a6c062fad 100644 --- a/paludis/repositories/e/vdb_unmerger.cc +++ b/paludis/repositories/e/vdb_unmerger.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh * Copyright (c) 2007 Piotr Jaroszyński * * This file is part of the Paludis package manager. Paludis is free software; @@ -70,9 +70,9 @@ namespace paludis VDBUnmerger::VDBUnmerger(const VDBUnmergerOptions & o) : Unmerger(make_named_values<UnmergerOptions>( - value_for<n::environment>(o.environment()), - value_for<n::ignore>(o.ignore()), - value_for<n::root>(o.root()) + n::environment() = o.environment(), + n::ignore() = o.ignore(), + n::root() = o.root() )), PrivateImplementationPattern<VDBUnmerger>(new Implementation<VDBUnmerger>(o)), _imp(PrivateImplementationPattern<VDBUnmerger>::_imp.get()) diff --git a/paludis/repositories/e/vdb_unmerger.hh b/paludis/repositories/e/vdb_unmerger.hh index bf9beb109..03b407cfa 100644 --- a/paludis/repositories/e/vdb_unmerger.hh +++ b/paludis/repositories/e/vdb_unmerger.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh * Copyright (c) 2007 Piotr Jaroszyński * * This file is part of the Paludis package manager. Paludis is free software; @@ -32,13 +32,13 @@ namespace paludis namespace n { - struct config_protect; - struct config_protect_mask; - struct environment; - struct ignore; - struct output_manager; - struct package_id; - struct root; + typedef Name<struct config_protect_name> config_protect; + typedef Name<struct config_protect_mask_name> config_protect_mask; + typedef Name<struct environment_name> environment; + typedef Name<struct ignore_name> ignore; + typedef Name<struct output_manager_name> output_manager; + typedef Name<struct package_id_name> package_id; + typedef Name<struct root_name> root; } /** diff --git a/paludis/repositories/e/vdb_unmerger_TEST.cc b/paludis/repositories/e/vdb_unmerger_TEST.cc index b3ff6a43b..7c7ceb2fd 100644 --- a/paludis/repositories/e/vdb_unmerger_TEST.cc +++ b/paludis/repositories/e/vdb_unmerger_TEST.cc @@ -123,15 +123,15 @@ namespace env.package_database()->add_repository(0, repo); unmerger.reset(new VDBUnmergerNoDisplay(make_named_values<VDBUnmergerOptions>( - value_for<n::config_protect>("/protected_file /protected_dir"), - value_for<n::config_protect_mask>("/protected_dir/unprotected_file /protected_dir/unprotected_dir"), - value_for<n::environment>(&env), - value_for<n::ignore>(&ignore_nothing), - value_for<n::output_manager>(make_shared_ptr(new StandardOutputManager)), - value_for<n::package_id>(*env[selection::RequireExactlyOne(generator::Matches( + n::config_protect() = "/protected_file /protected_dir", + n::config_protect_mask() = "/protected_dir/unprotected_file /protected_dir/unprotected_dir", + n::environment() = &env, + n::ignore() = &ignore_nothing, + n::output_manager() = make_shared_ptr(new StandardOutputManager), + n::package_id() = *env[selection::RequireExactlyOne(generator::Matches( parse_user_package_dep_spec("cat/" + fix(what), &env, UserPackageDepSpecOptions()), - MatchPackageOptions()))]->begin()), - value_for<n::root>(root_dir) + MatchPackageOptions()))]->begin(), + n::root() = root_dir ))); main_run(); diff --git a/paludis/repositories/e/xml_things.cc b/paludis/repositories/e/xml_things.cc index 904a4dd3e..5c36c15f5 100644 --- a/paludis/repositories/e/xml_things.cc +++ b/paludis/repositories/e/xml_things.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -208,9 +208,9 @@ namespace std::string version(fix_whitespace(unstupid_libxml_string(xmlNodeListGetString(doc, n->xmlChildrenNode, 1)))); ((*pkg).*(name == "unaffected" ? &GLSAPackage::add_unaffected : &GLSAPackage::add_vulnerable))( make_named_values<erepository::GLSARange>( - value_for<n::op>(op), - value_for<n::slot>(slot), - value_for<n::version>(version) + n::op() = op, + n::slot() = slot, + n::version() = version )); } else @@ -287,10 +287,10 @@ paludis_xml_things_create_metadata_xml_from_xml_file(const FSEntry & filename) { std::tr1::shared_ptr<erepository::MetadataXML> result(new erepository::MetadataXML( make_named_values<erepository::MetadataXML>( - value_for<n::herds>(make_shared_ptr(new Sequence<std::string>)), - value_for<n::long_description>(""), - value_for<n::maintainers>(make_shared_ptr(new Sequence<std::string>)), - value_for<n::uses>(make_shared_ptr(new Map<ChoiceNameWithPrefix, std::string>)) + n::herds() = make_shared_ptr(new Sequence<std::string>), + n::long_description() = "", + n::maintainers() = make_shared_ptr(new Sequence<std::string>), + n::uses() = make_shared_ptr(new Map<ChoiceNameWithPrefix, std::string>) ))); std::tr1::shared_ptr<xmlDoc> doc(manage_libxml_ptr(xmlParseFile(stringify(filename).c_str()), &xmlFreeDoc)); diff --git a/paludis/repositories/fake/dep_parser.cc b/paludis/repositories/fake/dep_parser.cc index ed265bd54..de895d9cb 100644 --- a/paludis/repositories/fake/dep_parser.cc +++ b/paludis/repositories/fake/dep_parser.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -176,17 +176,17 @@ paludis::fakerepository::parse_depend(const std::string & s, ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<DependencySpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(&discard_annotations), - value_for<n::on_any>(std::tr1::bind(&any_all_handler<DependencySpecTree, AnyDepSpec>, std::tr1::ref(stack))), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&labels_not_allowed_handler, s, _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<DependencySpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<DependencySpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&package_or_block_dep_spec_string_handler<DependencySpecTree>, std::tr1::ref(stack), _1, id)), - value_for<n::on_use>(std::tr1::bind(&use_handler<DependencySpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(&do_nothing) + n::on_all() = std::tr1::bind(&any_all_handler<DependencySpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = &discard_annotations, + n::on_any() = std::tr1::bind(&any_all_handler<DependencySpecTree, AnyDepSpec>, std::tr1::ref(stack)), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&labels_not_allowed_handler, s, _1), + n::on_pop() = std::tr1::bind(&pop_handler<DependencySpecTree>, std::tr1::ref(stack), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<DependencySpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&package_or_block_dep_spec_string_handler<DependencySpecTree>, std::tr1::ref(stack), _1, id), + n::on_use() = std::tr1::bind(&use_handler<DependencySpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = &do_nothing )); parse_elike_dependencies(s, callbacks); @@ -206,17 +206,17 @@ paludis::fakerepository::parse_provide(const std::string & s, ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<ProvideSpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(&discard_annotations), - value_for<n::on_any>(std::tr1::bind(&any_not_allowed_handler, s)), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&labels_not_allowed_handler, s, _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<ProvideSpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<ProvideSpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&package_dep_spec_string_handler<ProvideSpecTree>, std::tr1::ref(stack), _1, id)), - value_for<n::on_use>(std::tr1::bind(&use_handler<ProvideSpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(&do_nothing) + n::on_all() = std::tr1::bind(&any_all_handler<ProvideSpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = &discard_annotations, + n::on_any() = std::tr1::bind(&any_not_allowed_handler, s), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&labels_not_allowed_handler, s, _1), + n::on_pop() = std::tr1::bind(&pop_handler<ProvideSpecTree>, std::tr1::ref(stack), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<ProvideSpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&package_dep_spec_string_handler<ProvideSpecTree>, std::tr1::ref(stack), _1, id), + n::on_use() = std::tr1::bind(&use_handler<ProvideSpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = &do_nothing )); parse_elike_dependencies(s, callbacks); @@ -236,17 +236,17 @@ paludis::fakerepository::parse_fetchable_uri(const std::string & s, ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<FetchableURISpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(&discard_annotations), - value_for<n::on_any>(std::tr1::bind(&any_not_allowed_handler, s)), - value_for<n::on_arrow>(std::tr1::bind(&arrow_handler<FetchableURISpecTree>, std::tr1::ref(stack), _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&labels_not_allowed_handler, s, _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<FetchableURISpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<FetchableURISpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&arrow_handler<FetchableURISpecTree>, std::tr1::ref(stack), _1, "")), - value_for<n::on_use>(std::tr1::bind(&use_handler<FetchableURISpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(&do_nothing) + n::on_all() = std::tr1::bind(&any_all_handler<FetchableURISpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = &discard_annotations, + n::on_any() = std::tr1::bind(&any_not_allowed_handler, s), + n::on_arrow() = std::tr1::bind(&arrow_handler<FetchableURISpecTree>, std::tr1::ref(stack), _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&labels_not_allowed_handler, s, _1), + n::on_pop() = std::tr1::bind(&pop_handler<FetchableURISpecTree>, std::tr1::ref(stack), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<FetchableURISpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&arrow_handler<FetchableURISpecTree>, std::tr1::ref(stack), _1, ""), + n::on_use() = std::tr1::bind(&use_handler<FetchableURISpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = &do_nothing )); parse_elike_dependencies(s, callbacks); @@ -266,17 +266,17 @@ paludis::fakerepository::parse_simple_uri(const std::string & s, ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<SimpleURISpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(&discard_annotations), - value_for<n::on_any>(std::tr1::bind(&any_not_allowed_handler, s)), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&labels_not_allowed_handler, s, _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<SimpleURISpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<SimpleURISpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&simple_uri_handler<SimpleURISpecTree>, std::tr1::ref(stack), _1)), - value_for<n::on_use>(std::tr1::bind(&use_handler<SimpleURISpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(&do_nothing) + n::on_all() = std::tr1::bind(&any_all_handler<SimpleURISpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = &discard_annotations, + n::on_any() = std::tr1::bind(&any_not_allowed_handler, s), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&labels_not_allowed_handler, s, _1), + n::on_pop() = std::tr1::bind(&pop_handler<SimpleURISpecTree>, std::tr1::ref(stack), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<SimpleURISpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&simple_uri_handler<SimpleURISpecTree>, std::tr1::ref(stack), _1), + n::on_use() = std::tr1::bind(&use_handler<SimpleURISpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = &do_nothing )); parse_elike_dependencies(s, callbacks); @@ -296,17 +296,17 @@ paludis::fakerepository::parse_license(const std::string & s, ELikeDepParserCallbacks callbacks( make_named_values<ELikeDepParserCallbacks>( - value_for<n::on_all>(std::tr1::bind(&any_all_handler<LicenseSpecTree, AllDepSpec>, std::tr1::ref(stack))), - value_for<n::on_annotations>(&discard_annotations), - value_for<n::on_any>(std::tr1::bind(&any_all_handler<LicenseSpecTree, AnyDepSpec>, std::tr1::ref(stack))), - value_for<n::on_arrow>(std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2)), - value_for<n::on_error>(std::tr1::bind(&error_handler, s, _1)), - value_for<n::on_label>(std::tr1::bind(&labels_not_allowed_handler, s, _1)), - value_for<n::on_pop>(std::tr1::bind(&pop_handler<LicenseSpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_should_be_empty>(std::tr1::bind(&should_be_empty_handler<LicenseSpecTree>, std::tr1::ref(stack), s)), - value_for<n::on_string>(std::tr1::bind(&license_handler<LicenseSpecTree>, std::tr1::ref(stack), _1)), - value_for<n::on_use>(std::tr1::bind(&use_handler<LicenseSpecTree>, std::tr1::ref(stack), _1, env, id)), - value_for<n::on_use_under_any>(&do_nothing) + n::on_all() = std::tr1::bind(&any_all_handler<LicenseSpecTree, AllDepSpec>, std::tr1::ref(stack)), + n::on_annotations() = &discard_annotations, + n::on_any() = std::tr1::bind(&any_all_handler<LicenseSpecTree, AnyDepSpec>, std::tr1::ref(stack)), + n::on_arrow() = std::tr1::bind(&arrows_not_allowed_handler, s, _1, _2), + n::on_error() = std::tr1::bind(&error_handler, s, _1), + n::on_label() = std::tr1::bind(&labels_not_allowed_handler, s, _1), + n::on_pop() = std::tr1::bind(&pop_handler<LicenseSpecTree>, std::tr1::ref(stack), s), + n::on_should_be_empty() = std::tr1::bind(&should_be_empty_handler<LicenseSpecTree>, std::tr1::ref(stack), s), + n::on_string() = std::tr1::bind(&license_handler<LicenseSpecTree>, std::tr1::ref(stack), _1), + n::on_use() = std::tr1::bind(&use_handler<LicenseSpecTree>, std::tr1::ref(stack), _1, env, id), + n::on_use_under_any() = &do_nothing )); parse_elike_dependencies(s, callbacks); diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc index 17b496abe..0a438b0dc 100644 --- a/paludis/repositories/fake/fake_installed_repository.cc +++ b/paludis/repositories/fake/fake_installed_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010 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 @@ -60,12 +60,12 @@ namespace paludis FakeInstalledRepository::FakeInstalledRepository(const FakeInstalledRepositoryParams & p) : FakeRepositoryBase(p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(this), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(this), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = this, + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = this, + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), PrivateImplementationPattern<FakeInstalledRepository>(new Implementation<FakeInstalledRepository>( p.supports_uninstall(), p.suitable_destination())), @@ -110,8 +110,8 @@ FakeInstalledRepository::provided_packages() const for (DepSpecFlattener<ProvideSpecTree, PackageDepSpec>::ConstIterator q(f.begin()), q_end(f.end()) ; q != q_end ; ++q) result->push_back(make_named_values<RepositoryProvidesEntry>( - value_for<n::provided_by>(*v), - value_for<n::virtual_name>(QualifiedPackageName((*q)->text())) + n::provided_by() = *v, + n::virtual_name() = QualifiedPackageName((*q)->text()) )); } } @@ -232,10 +232,10 @@ FakeInstalledRepository::repository_factory_create( RepositoryName name(f("name")); return make_shared_ptr(new FakeInstalledRepository(make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(env), - value_for<n::name>(name), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = env, + n::name() = name, + n::suitable_destination() = true, + n::supports_uninstall() = true ))); } diff --git a/paludis/repositories/fake/fake_installed_repository.hh b/paludis/repositories/fake/fake_installed_repository.hh index db3d8b862..10ac023f1 100644 --- a/paludis/repositories/fake/fake_installed_repository.hh +++ b/paludis/repositories/fake/fake_installed_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010 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 @@ -26,10 +26,10 @@ namespace paludis { namespace n { - struct environment; - struct name; - struct suitable_destination; - struct supports_uninstall; + typedef Name<struct environment_name> environment; + typedef Name<struct name_name> name; + typedef Name<struct suitable_destination_name> suitable_destination; + typedef Name<struct supports_uninstall_name> supports_uninstall; } /** diff --git a/paludis/repositories/fake/fake_installed_repository_TEST.cc b/paludis/repositories/fake/fake_installed_repository_TEST.cc index 362d0da90..b04396786 100644 --- a/paludis/repositories/fake/fake_installed_repository_TEST.cc +++ b/paludis/repositories/fake/fake_installed_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -37,10 +37,10 @@ namespace test_cases TestEnvironment env; std::tr1::shared_ptr<const FakeInstalledRepository> r(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("fake")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("fake"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); } } test_fake_installed_repository; diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc index aa84ff46e..1b2b47f8e 100644 --- a/paludis/repositories/fake/fake_package_id.cc +++ b/paludis/repositories/fake/fake_package_id.cc @@ -575,13 +575,13 @@ FakeMetadataChoicesKey::add(const std::string & n, const std::string & v) if (_imp->choices.end() == _imp->choices.find(n)) { std::tr1::shared_ptr<Choice> c(new Choice(make_named_values<ChoiceParams>( - value_for<n::consider_added_or_changed>(false), - value_for<n::contains_every_value>(false), - value_for<n::hidden>(false), - value_for<n::human_name>(n.empty() ? "default" : n), - value_for<n::prefix>(ChoicePrefixName(n)), - value_for<n::raw_name>(n.empty() ? "default" : n), - value_for<n::show_with_no_prefix>(false) + n::consider_added_or_changed() = false, + n::contains_every_value() = false, + n::hidden() = false, + n::human_name() = n.empty() ? "default" : n, + n::prefix() = ChoicePrefixName(n), + n::raw_name() = n.empty() ? "default" : n, + n::show_with_no_prefix() = false ))); _imp->value->add(c); _imp->choices.insert(std::make_pair(n, c)); @@ -1171,8 +1171,8 @@ FakePackageID::need_masks_added() const if (user_mask) add_overridden_mask(make_shared_ptr(new OverriddenMask( make_named_values<OverriddenMask>( - value_for<n::mask>(user_mask), - value_for<n::override_reason>(mro_overridden_by_user) + n::mask() = user_mask, + n::override_reason() = mro_overridden_by_user )))); } diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc index 370846043..19b188423 100644 --- a/paludis/repositories/fake/fake_repository.cc +++ b/paludis/repositories/fake/fake_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010 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 @@ -55,13 +55,13 @@ namespace paludis FakeRepository::FakeRepository(const FakeRepositoryParams & params) : PrivateImplementationPattern<FakeRepository>(new Implementation<FakeRepository>), FakeRepositoryBase(params.environment(), params.name(), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>((*DistributionData::get_instance()->distribution_from_string( - params.environment()->distribution())).support_old_style_virtuals() ? this : 0) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = (*DistributionData::get_instance()->distribution_from_string( + params.environment()->distribution())).support_old_style_virtuals() ? this : 0 )), _imp(PrivateImplementationPattern<FakeRepository>::_imp) { @@ -82,8 +82,8 @@ void FakeRepository::add_virtual_package(const QualifiedPackageName & q, const std::tr1::shared_ptr<const PackageDepSpec> & p) { _imp->virtual_packages->push_back(make_named_values<RepositoryVirtualsEntry>( - value_for<n::provided_by_spec>(p), - value_for<n::virtual_name>(q) + n::provided_by_spec() = p, + n::virtual_name() = q )); } diff --git a/paludis/repositories/fake/fake_repository.hh b/paludis/repositories/fake/fake_repository.hh index a93151ed0..884e183eb 100644 --- a/paludis/repositories/fake/fake_repository.hh +++ b/paludis/repositories/fake/fake_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010 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 @@ -27,8 +27,8 @@ namespace paludis { namespace n { - struct environment; - struct name; + typedef Name<struct environment_name> environment; + typedef Name<struct name_name> name; } /** diff --git a/paludis/repositories/fake/fake_repository_TEST.cc b/paludis/repositories/fake/fake_repository_TEST.cc index d896dff1f..ab83544af 100644 --- a/paludis/repositories/fake/fake_repository_TEST.cc +++ b/paludis/repositories/fake/fake_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -36,8 +36,8 @@ namespace test_cases { TestEnvironment env; const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); } } test_fake_repository; diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc index 1d88e571e..809b09b01 100644 --- a/paludis/repositories/fake/fake_repository_base.cc +++ b/paludis/repositories/fake/fake_repository_base.cc @@ -207,7 +207,7 @@ FakeRepositoryBase::populate_sets() const HookResult FakeRepositoryBase::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } bool diff --git a/paludis/repositories/gems/extra_distribution_data.cc b/paludis/repositories/gems/extra_distribution_data.cc index 43ce4f346..0a39033e3 100644 --- a/paludis/repositories/gems/extra_distribution_data.cc +++ b/paludis/repositories/gems/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, 2010 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 @@ -38,7 +38,7 @@ namespace paludis static std::tr1::shared_ptr<GemsDistribution> make_data(const std::tr1::shared_ptr<const KeyValueConfigFile> & k) { return make_shared_ptr(new GemsDistribution(make_named_values<GemsDistribution>( - value_for<n::default_buildroot>(k->get("default_buildroot")) + n::default_buildroot() = k->get("default_buildroot") ))); } }; diff --git a/paludis/repositories/gems/extra_distribution_data.hh b/paludis/repositories/gems/extra_distribution_data.hh index 5f8c21100..990758d06 100644 --- a/paludis/repositories/gems/extra_distribution_data.hh +++ b/paludis/repositories/gems/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, 2010 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 @@ -28,7 +28,7 @@ namespace paludis { namespace n { - struct default_buildroot; + typedef Name<struct default_buildroot_name> default_buildroot; } namespace gems diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc index 37d6c4b28..841f70159 100644 --- a/paludis/repositories/gems/gem_specification.cc +++ b/paludis/repositories/gems/gem_specification.cc @@ -609,8 +609,8 @@ GemSpecification::need_masks_added() const if (user_mask) add_overridden_mask(make_shared_ptr(new OverriddenMask( make_named_values<OverriddenMask>( - value_for<n::mask>(user_mask), - value_for<n::override_reason>(mro_overridden_by_user) + n::mask() = user_mask, + n::override_reason() = mro_overridden_by_user )))); } diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc index 1c2526079..0e629acef 100644 --- a/paludis/repositories/gems/gems_repository.cc +++ b/paludis/repositories/gems/gems_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -92,12 +92,12 @@ namespace paludis GemsRepository::GemsRepository(const gems::RepositoryParams & params) : Repository(params.environment(), RepositoryName("gems"), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), PrivateImplementationPattern<GemsRepository>(new Implementation<GemsRepository>(params)), _imp(PrivateImplementationPattern<GemsRepository>::_imp) @@ -377,12 +377,12 @@ GemsRepository::repository_factory_create( *DistributionData::get_instance()->distribution_from_string(env->distribution()))->default_buildroot(); return make_shared_ptr(new GemsRepository(make_named_values<gems::RepositoryParams>( - value_for<n::builddir>(builddir), - value_for<n::environment>(env), - value_for<n::install_dir>(install_dir), - value_for<n::location>(location), - value_for<n::sync>(sync), - value_for<n::sync_options>(sync_options) + n::builddir() = builddir, + n::environment() = env, + n::install_dir() = install_dir, + n::location() = location, + n::sync() = sync, + n::sync_options() = sync_options ))); } @@ -410,7 +410,7 @@ GemsRepository::populate_sets() const HookResult GemsRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } bool diff --git a/paludis/repositories/gems/gems_repository_TEST.cc b/paludis/repositories/gems/gems_repository_TEST.cc index d1becae4f..858d953ba 100644 --- a/paludis/repositories/gems/gems_repository_TEST.cc +++ b/paludis/repositories/gems/gems_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2010 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 @@ -40,12 +40,12 @@ namespace test_cases TestEnvironment env; env.package_database()->add_repository(1, make_shared_ptr(new GemsRepository( make_named_values<gems::RepositoryParams>( - value_for<n::builddir>(FSEntry("gems_repository_TEST_dir/build")), - value_for<n::environment>(&env), - value_for<n::install_dir>(FSEntry("gems_repository_TEST_dir/install")), - value_for<n::location>(FSEntry("gems_repository_TEST_dir/repo")), - value_for<n::sync>(""), - value_for<n::sync_options>("") + n::builddir() = FSEntry("gems_repository_TEST_dir/build"), + n::environment() = &env, + n::install_dir() = FSEntry("gems_repository_TEST_dir/install"), + n::location() = FSEntry("gems_repository_TEST_dir/repo"), + n::sync() = "", + n::sync_options() = "" )))); } } test_creation; diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc index 7b86b2106..ec361e08e 100644 --- a/paludis/repositories/gems/installed_gems_repository.cc +++ b/paludis/repositories/gems/installed_gems_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -97,12 +97,12 @@ InstalledGemsRepository::InstalledGemsRepository(const gems::InstalledRepository Repository(params.environment(), RepositoryName("installed-gems"), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(this), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = this, + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), PrivateImplementationPattern<InstalledGemsRepository>(new Implementation<InstalledGemsRepository>(params)), _imp(PrivateImplementationPattern<InstalledGemsRepository>::_imp) @@ -412,10 +412,10 @@ InstalledGemsRepository::repository_factory_create( root = "/"; return make_shared_ptr(new InstalledGemsRepository(make_named_values<gems::InstalledRepositoryParams>( - value_for<n::builddir>(builddir), - value_for<n::environment>(env), - value_for<n::install_dir>(install_dir), - value_for<n::root>(root) + n::builddir() = builddir, + n::environment() = env, + n::install_dir() = install_dir, + n::root() = root ))); } @@ -428,7 +428,7 @@ InstalledGemsRepository::populate_sets() const HookResult InstalledGemsRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } bool diff --git a/paludis/repositories/gems/params.hh b/paludis/repositories/gems/params.hh index 2d6d88fb7..c5adda912 100644 --- a/paludis/repositories/gems/params.hh +++ b/paludis/repositories/gems/params.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2010 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 @@ -32,13 +32,13 @@ namespace paludis namespace n { - struct builddir; - struct environment; - struct install_dir; - struct location; - struct root; - struct sync; - struct sync_options; + typedef Name<struct builddir_name> builddir; + typedef Name<struct environment_name> environment; + typedef Name<struct install_dir_name> install_dir; + typedef Name<struct location_name> location; + typedef Name<struct root_name> root; + typedef Name<struct sync_name> sync; + typedef Name<struct sync_options_name> sync_options; } namespace gems diff --git a/paludis/repositories/repository/repository_id.hh b/paludis/repositories/repository/repository_id.hh index a44a984a4..ee6a2ddee 100644 --- a/paludis/repositories/repository/repository_id.hh +++ b/paludis/repositories/repository/repository_id.hh @@ -29,9 +29,9 @@ namespace paludis { namespace n { - struct environment; - struct name; - struct repository; + typedef Name<struct environment_name> environment; + typedef Name<struct name_name> name; + typedef Name<struct repository_name> repository; } namespace repository_repository diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc index 2a189597d..c29a41ee8 100644 --- a/paludis/repositories/repository/repository_repository.cc +++ b/paludis/repositories/repository/repository_repository.cc @@ -92,12 +92,12 @@ RepositoryRepository::RepositoryRepository(const RepositoryRepositoryParams & p) p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(this)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(this), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), _imp(PrivateImplementationPattern<RepositoryRepository>::_imp) { @@ -286,11 +286,11 @@ RepositoryRepository::repository_factory_create( return std::tr1::shared_ptr<RepositoryRepository>(new RepositoryRepository( make_named_values<RepositoryRepositoryParams>( - value_for<n::config_filename>(config_filename), - value_for<n::config_template>(config_template), - value_for<n::environment>(env), - value_for<n::name>(RepositoryName(name_str)), - value_for<n::root>(root_str) + n::config_filename() = config_filename, + n::config_template() = config_template, + n::environment() = env, + n::name() = RepositoryName(name_str), + n::root() = root_str ))); } @@ -321,7 +321,7 @@ RepositoryRepository::populate_sets() const HookResult RepositoryRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } const std::tr1::shared_ptr<const MetadataValueKey<std::string> > diff --git a/paludis/repositories/repository/repository_repository.hh b/paludis/repositories/repository/repository_repository.hh index ff9bd2e21..f5523b12f 100644 --- a/paludis/repositories/repository/repository_repository.hh +++ b/paludis/repositories/repository/repository_repository.hh @@ -29,11 +29,11 @@ namespace paludis { namespace n { - struct config_filename; - struct config_template; - struct environment; - struct name; - struct root; + typedef Name<struct config_filename_name> config_filename; + typedef Name<struct config_template_name> config_template; + typedef Name<struct environment_name> environment; + typedef Name<struct name_name> name; + typedef Name<struct root_name> root; } namespace repository_repository diff --git a/paludis/repositories/repository/repository_repository_store.cc b/paludis/repositories/repository/repository_repository_store.cc index efea44d8a..7f20d9ba4 100644 --- a/paludis/repositories/repository/repository_repository_store.cc +++ b/paludis/repositories/repository/repository_repository_store.cc @@ -94,9 +94,9 @@ void RepositoryRepositoryStore::_populate_one(const RepositoryName & repo_name) { const std::tr1::shared_ptr<RepositoryID> id(new RepositoryID(make_named_values<RepositoryIDParams>( - value_for<n::environment>(_imp->env), - value_for<n::name>(CategoryNamePart("repository") + PackageNamePart(stringify(repo_name))), - value_for<n::repository>(_imp->repo) + n::environment() = _imp->env, + n::name() = CategoryNamePart("repository") + PackageNamePart(stringify(repo_name)), + n::repository() = _imp->repo ))); _imp->categories->insert(id->name().category()); diff --git a/paludis/repositories/unavailable/unavailable_package_id.hh b/paludis/repositories/unavailable/unavailable_package_id.hh index 6b155e6b1..214d88f35 100644 --- a/paludis/repositories/unavailable/unavailable_package_id.hh +++ b/paludis/repositories/unavailable/unavailable_package_id.hh @@ -29,16 +29,16 @@ namespace paludis { namespace n { - struct description; - struct environment; - struct from_repositories; - struct mask; - struct name; - struct repository; - struct repository_description; - struct repository_homepage; - struct slot; - struct version; + typedef Name<struct description_name> description; + typedef Name<struct environment_name> environment; + typedef Name<struct from_repositories_name> from_repositories; + typedef Name<struct mask_name> mask; + typedef Name<struct name_name> name; + typedef Name<struct repository_name> repository; + typedef Name<struct repository_description_name> repository_description; + typedef Name<struct repository_homepage_name> repository_homepage; + typedef Name<struct slot_name> slot; + typedef Name<struct version_name> version; } namespace unavailable_repository diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc index 219d32601..dbdbffdb5 100644 --- a/paludis/repositories/unavailable/unavailable_repository.cc +++ b/paludis/repositories/unavailable/unavailable_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -89,12 +89,12 @@ UnavailableRepository::UnavailableRepository(const UnavailableRepositoryParams & p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), _imp(PrivateImplementationPattern<UnavailableRepository>::_imp) { @@ -269,14 +269,14 @@ UnavailableRepository::sync(const std::tr1::shared_ptr<OutputManager> & output_m s_end(sync_list.end()) ; s != s_end ; ++s) { DefaultSyncer syncer(make_named_values<SyncerParams>( - value_for<n::environment>(_imp->params.environment()), - value_for<n::local>(stringify(_imp->params.location())), - value_for<n::remote>(*s) + n::environment() = _imp->params.environment(), + n::local() = stringify(_imp->params.location()), + n::remote() = *s )); SyncOptions opts(make_named_values<SyncOptions>( - value_for<n::filter_file>(FSEntry("/dev/null")), - value_for<n::options>(_imp->params.sync_options()), - value_for<n::output_manager>(output_manager) + n::filter_file() = FSEntry("/dev/null"), + n::options() = _imp->params.sync_options(), + n::output_manager() = output_manager )); try { @@ -318,11 +318,11 @@ UnavailableRepository::repository_factory_create( return std::tr1::shared_ptr<UnavailableRepository>(new UnavailableRepository( make_named_values<UnavailableRepositoryParams>( - value_for<n::environment>(env), - value_for<n::location>(location), - value_for<n::name>(RepositoryName(name_str)), - value_for<n::sync>(sync), - value_for<n::sync_options>(sync_options) + n::environment() = env, + n::location() = location, + n::name() = RepositoryName(name_str), + n::sync() = sync, + n::sync_options() = sync_options ))); } @@ -353,7 +353,7 @@ UnavailableRepository::populate_sets() const HookResult UnavailableRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } const std::tr1::shared_ptr<const MetadataValueKey<std::string> > diff --git a/paludis/repositories/unavailable/unavailable_repository.hh b/paludis/repositories/unavailable/unavailable_repository.hh index 1b24e9a16..7d801463a 100644 --- a/paludis/repositories/unavailable/unavailable_repository.hh +++ b/paludis/repositories/unavailable/unavailable_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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,11 +29,11 @@ namespace paludis { namespace n { - struct environment; - struct location; - struct name; - struct sync; - struct sync_options; + typedef Name<struct environment_name> environment; + typedef Name<struct location_name> location; + typedef Name<struct name_name> name; + typedef Name<struct sync_name> sync; + typedef Name<struct sync_options_name> sync_options; } namespace unavailable_repository diff --git a/paludis/repositories/unavailable/unavailable_repository_TEST.cc b/paludis/repositories/unavailable/unavailable_repository_TEST.cc index 9a63766e8..d9e4abc5a 100644 --- a/paludis/repositories/unavailable/unavailable_repository_TEST.cc +++ b/paludis/repositories/unavailable/unavailable_repository_TEST.cc @@ -50,11 +50,11 @@ namespace test_cases TestEnvironment env; std::tr1::shared_ptr<UnavailableRepository> repo(new UnavailableRepository( make_named_values<UnavailableRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry::cwd() / "unavailable_repository_TEST_dir" / "repo1"), - value_for<n::name>(RepositoryName("unavailable")), - value_for<n::sync>(""), - value_for<n::sync_options>("") + n::environment() = &env, + n::location() = FSEntry::cwd() / "unavailable_repository_TEST_dir" / "repo1", + n::name() = RepositoryName("unavailable"), + n::sync() = "", + n::sync_options() = "" ))); env.package_database()->add_repository(1, repo); TEST_CHECK_STRINGIFY_EQUAL(repo->name(), "unavailable"); @@ -70,11 +70,11 @@ namespace test_cases TestEnvironment env; std::tr1::shared_ptr<UnavailableRepository> repo(new UnavailableRepository( make_named_values<UnavailableRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry::cwd() / "unavailable_repository_TEST_dir" / "repo2"), - value_for<n::name>(RepositoryName("unavailable")), - value_for<n::sync>(""), - value_for<n::sync_options>("") + n::environment() = &env, + n::location() = FSEntry::cwd() / "unavailable_repository_TEST_dir" / "repo2", + n::name() = RepositoryName("unavailable"), + n::sync() = "", + n::sync_options() = "" ))); env.package_database()->add_repository(1, repo); TEST_CHECK_STRINGIFY_EQUAL(repo->name(), "unavailable"); @@ -99,8 +99,8 @@ namespace test_cases ); const std::tr1::shared_ptr<FakeRepository> hide_bar(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("bar")) + n::environment() = &env, + n::name() = RepositoryName("bar") ))); env.package_database()->add_repository(2, hide_bar); repo->invalidate(); diff --git a/paludis/repositories/unavailable/unavailable_repository_file-fwd.hh b/paludis/repositories/unavailable/unavailable_repository_file-fwd.hh index 8855064f1..9c870a7ec 100644 --- a/paludis/repositories/unavailable/unavailable_repository_file-fwd.hh +++ b/paludis/repositories/unavailable/unavailable_repository_file-fwd.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008 Ciaran McCreesh + * Copyright (c) 2008, 2010 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 @@ -31,10 +31,10 @@ namespace paludis { namespace n { - struct description; - struct name; - struct slot; - struct version; + typedef Name<struct description_name> description; + typedef Name<struct name_name> name; + typedef Name<struct slot_name> slot; + typedef Name<struct version_name> version; } namespace unavailable_repository diff --git a/paludis/repositories/unavailable/unavailable_repository_file.cc b/paludis/repositories/unavailable/unavailable_repository_file.cc index 0d8db74b4..31891552b 100644 --- a/paludis/repositories/unavailable/unavailable_repository_file.cc +++ b/paludis/repositories/unavailable/unavailable_repository_file.cc @@ -215,10 +215,10 @@ UnavailableRepositoryFile::_load(const FSEntry & f) for (std::list<VersionSpec>::const_iterator v(versions.begin()), v_end(versions.end()) ; v != v_end ; ++v) _imp->entries.push_back(make_named_values<UnavailableRepositoryFileEntry>( - value_for<n::description>(desc), - value_for<n::name>(category + package), - value_for<n::slot>(slot), - value_for<n::version>(*v) + n::description() = desc, + n::name() = category + package, + n::slot() = slot, + n::version() = *v )); } else diff --git a/paludis/repositories/unavailable/unavailable_repository_id.cc b/paludis/repositories/unavailable/unavailable_repository_id.cc index 854d0beb0..db1ace1b5 100644 --- a/paludis/repositories/unavailable/unavailable_repository_id.cc +++ b/paludis/repositories/unavailable/unavailable_repository_id.cc @@ -204,16 +204,16 @@ UnavailableRepositoryID::perform_action(Action & action) const { (*install_action->options.destination()).destination_interface()->merge( make_named_values<MergeParams>( - value_for<n::build_start_time>(build_start_time), - value_for<n::environment_file>(FSEntry("/dev/null")), - value_for<n::image_dir>(FSEntry("/dev/null")), - value_for<n::merged_entries>(make_shared_ptr(new FSEntrySet)), - value_for<n::options>(MergerOptions()), - value_for<n::output_manager>(output_manager), - value_for<n::package_id>(shared_from_this()), - value_for<n::perform_uninstall>(install_action->options.perform_uninstall()), - value_for<n::used_this_for_config_protect>(std::tr1::bind( - &used_this_for_config_protect, std::tr1::ref(used_config_protect), std::tr1::placeholders::_1)) + n::build_start_time() = build_start_time, + n::environment_file() = FSEntry("/dev/null"), + n::image_dir() = FSEntry("/dev/null"), + n::merged_entries() = make_shared_ptr(new FSEntrySet), + n::options() = MergerOptions(), + n::output_manager() = output_manager, + n::package_id() = shared_from_this(), + n::perform_uninstall() = install_action->options.perform_uninstall(), + n::used_this_for_config_protect() = std::tr1::bind( + &used_this_for_config_protect, std::tr1::ref(used_config_protect), std::tr1::placeholders::_1) )); } break; @@ -235,12 +235,12 @@ UnavailableRepositoryID::perform_action(Action & action) const Context local_context("When cleaning '" + stringify(**i) + "':"); UninstallActionOptions uo(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(used_config_protect), - value_for<n::if_for_install_id>(shared_from_this()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(std::tr1::bind( - &this_output_manager, output_manager, std::tr1::placeholders::_1)) + n::config_protect() = used_config_protect, + n::if_for_install_id() = shared_from_this(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = std::tr1::bind( + &this_output_manager, output_manager, std::tr1::placeholders::_1) )); install_action->options.perform_uninstall()(*i, uo); } diff --git a/paludis/repositories/unavailable/unavailable_repository_id.hh b/paludis/repositories/unavailable/unavailable_repository_id.hh index 66a9f4cb9..1e70ee419 100644 --- a/paludis/repositories/unavailable/unavailable_repository_id.hh +++ b/paludis/repositories/unavailable/unavailable_repository_id.hh @@ -30,15 +30,15 @@ namespace paludis { namespace n { - struct dependencies; - struct description; - struct environment; - struct format; - struct homepage; - struct mask; - struct name; - struct repository; - struct sync; + typedef Name<struct dependencies_name> dependencies; + typedef Name<struct description_name> description; + typedef Name<struct environment_name> environment; + typedef Name<struct format_name> format; + typedef Name<struct homepage_name> homepage; + typedef Name<struct mask_name> mask; + typedef Name<struct name_name> name; + typedef Name<struct repository_name> repository; + typedef Name<struct sync_name> sync; } namespace unavailable_repository diff --git a/paludis/repositories/unavailable/unavailable_repository_store.cc b/paludis/repositories/unavailable/unavailable_repository_store.cc index ba6016085..4f0263a1c 100644 --- a/paludis/repositories/unavailable/unavailable_repository_store.cc +++ b/paludis/repositories/unavailable/unavailable_repository_store.cc @@ -173,16 +173,16 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F } ids->push_back(make_shared_ptr(new UnavailablePackageID(make_named_values<UnavailablePackageIDParams>( - value_for<n::description>((*i).description()), - value_for<n::environment>(env), - value_for<n::from_repositories>(from_repositories), - value_for<n::mask>(mask), - value_for<n::name>((*i).name()), - value_for<n::repository>(_imp->repo), - value_for<n::repository_description>(repository_description), - value_for<n::repository_homepage>(repository_homepage), - value_for<n::slot>((*i).slot()), - value_for<n::version>((*i).version()) + n::description() = (*i).description(), + n::environment() = env, + n::from_repositories() = from_repositories, + n::mask() = mask, + n::name() = (*i).name(), + n::repository() = _imp->repo, + n::repository_description() = repository_description, + n::repository_homepage() = repository_homepage, + n::slot() = (*i).slot(), + n::version() = (*i).version() )))); old_name = (*i).name(); @@ -199,16 +199,16 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F const std::tr1::shared_ptr<UnavailableRepositoryID> id(new UnavailableRepositoryID( make_named_values<UnavailableRepositoryIDParams>( - value_for<n::dependencies>(deps), - value_for<n::description>(repository_description), - value_for<n::environment>(env), - value_for<n::format>(repository_format), - value_for<n::homepage>(repository_homepage), - value_for<n::mask>(repository_sync && repository_format ? - make_null_shared_ptr() : no_configuration_mask), - value_for<n::name>(CategoryNamePart("repository") + PackageNamePart(file.repo_name())), - value_for<n::repository>(_imp->repo), - value_for<n::sync>(repository_sync) + n::dependencies() = deps, + n::description() = repository_description, + n::environment() = env, + n::format() = repository_format, + n::homepage() = repository_homepage, + n::mask() = repository_sync && repository_format ? + make_null_shared_ptr() : no_configuration_mask, + n::name() = CategoryNamePart("repository") + PackageNamePart(file.repo_name()), + n::repository() = _imp->repo, + n::sync() = repository_sync ))); _imp->categories->insert(id->name().category()); diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc index 2b1f3fb88..94862c083 100644 --- a/paludis/repositories/unpackaged/installed_id.cc +++ b/paludis/repositories/unpackaged/installed_id.cc @@ -877,15 +877,15 @@ InstalledUnpackagedID::uninstall(const bool replace, NDBAMUnmerger unmerger( make_named_values<NDBAMUnmergerOptions>( - value_for<n::config_protect>(getenv_with_default("CONFIG_PROTECT", "")), - value_for<n::config_protect_mask>(getenv_with_default("CONFIG_PROTECT_MASK", "")), - value_for<n::contents_file>(ver_dir / "contents"), - value_for<n::environment>(_imp->env), - value_for<n::ignore>(&ignore_nothing), - value_for<n::ndbam>(_imp->ndbam), - value_for<n::output_manager>(output_manager), - value_for<n::package_id>(shared_from_this()), - value_for<n::root>(_imp->root) + n::config_protect() = getenv_with_default("CONFIG_PROTECT", ""), + n::config_protect_mask() = getenv_with_default("CONFIG_PROTECT_MASK", ""), + n::contents_file() = ver_dir / "contents", + n::environment() = _imp->env, + n::ignore() = &ignore_nothing, + n::ndbam() = _imp->ndbam, + n::output_manager() = output_manager, + n::package_id() = shared_from_this(), + n::root() = _imp->root )); unmerger.unmerge(); diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc index 359521efe..05225f7b9 100644 --- a/paludis/repositories/unpackaged/installed_repository.cc +++ b/paludis/repositories/unpackaged/installed_repository.cc @@ -92,12 +92,12 @@ InstalledUnpackagedRepository::InstalledUnpackagedRepository( const RepositoryName & n, const InstalledUnpackagedRepositoryParams & p) : PrivateImplementationPattern<InstalledUnpackagedRepository>(new Implementation<InstalledUnpackagedRepository>(p)), Repository(p.environment(), n, make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(this), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = this, + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), _imp(PrivateImplementationPattern<InstalledUnpackagedRepository>::_imp) { @@ -349,20 +349,20 @@ InstalledUnpackagedRepository::merge(const MergeParams & m) NDBAMMerger merger( make_named_values<NDBAMMergerParams>( - value_for<n::config_protect>(getenv_with_default("CONFIG_PROTECT", "")), - value_for<n::config_protect_mask>(getenv_with_default("CONFIG_PROTECT_MASK", "")), - value_for<n::contents_file>(target_ver_dir / "contents"), - value_for<n::environment>(_imp->params.environment()), - value_for<n::fix_mtimes_before>(m.build_start_time()), - value_for<n::get_new_ids_or_minus_one>(std::tr1::bind(&get_new_ids_or_minus_one, - _imp->params.environment(), rewrite_ids_over_to_root, _1)), - value_for<n::image>(m.image_dir()), - value_for<n::install_under>(install_under), - value_for<n::merged_entries>(make_shared_ptr(new FSEntrySet)), - value_for<n::options>(MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs), - value_for<n::output_manager>(m.output_manager()), - value_for<n::package_id>(m.package_id()), - value_for<n::root>(installed_root_key()->value()) + n::config_protect() = getenv_with_default("CONFIG_PROTECT", ""), + n::config_protect_mask() = getenv_with_default("CONFIG_PROTECT_MASK", ""), + n::contents_file() = target_ver_dir / "contents", + n::environment() = _imp->params.environment(), + n::fix_mtimes_before() = m.build_start_time(), + n::get_new_ids_or_minus_one() = std::tr1::bind(&get_new_ids_or_minus_one, + _imp->params.environment(), rewrite_ids_over_to_root, _1), + n::image() = m.image_dir(), + n::install_under() = install_under, + n::merged_entries() = make_shared_ptr(new FSEntrySet), + n::options() = MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs, + n::output_manager() = m.output_manager(), + n::package_id() = m.package_id(), + n::root() = installed_root_key()->value() )); if (! merger.check()) @@ -461,9 +461,9 @@ InstalledUnpackagedRepository::repository_factory_create( return make_shared_ptr(new InstalledUnpackagedRepository(RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(env), - value_for<n::location>(location), - value_for<n::root>(root) + n::environment() = env, + n::location() = location, + n::root() = root ))); } @@ -492,7 +492,7 @@ InstalledUnpackagedRepository::populate_sets() const HookResult InstalledUnpackagedRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } bool diff --git a/paludis/repositories/unpackaged/installed_repository.hh b/paludis/repositories/unpackaged/installed_repository.hh index a5b46cb51..292172def 100644 --- a/paludis/repositories/unpackaged/installed_repository.hh +++ b/paludis/repositories/unpackaged/installed_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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,9 +29,9 @@ namespace paludis { namespace n { - struct environment; - struct location; - struct root; + typedef Name<struct environment_name> environment; + typedef Name<struct location_name> location; + typedef Name<struct root_name> root; } namespace unpackaged_repositories diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc index 1efb70011..3c4405822 100644 --- a/paludis/repositories/unpackaged/installed_repository_TEST.cc +++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -104,9 +104,9 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo1")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo1"), + n::root() = FSEntry("installed_repository_TEST_dir/root") ))); env.package_database()->add_repository(1, repo); @@ -127,9 +127,9 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo1")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo1"), + n::root() = FSEntry("installed_repository_TEST_dir/root") ))); env.package_database()->add_repository(1, repo); @@ -181,9 +181,9 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo1")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo1"), + n::root() = FSEntry("installed_repository_TEST_dir/root") ))); env.package_database()->add_repository(1, repo); @@ -211,9 +211,9 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo1")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo1"), + n::root() = FSEntry("installed_repository_TEST_dir/root") ))); env.package_database()->add_repository(1, repo); @@ -246,9 +246,9 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo2")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root2")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo2"), + n::root() = FSEntry("installed_repository_TEST_dir/root2") ))); env.package_database()->add_repository(1, repo); @@ -265,11 +265,11 @@ namespace test_cases const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::All())]->begin()); UninstallAction action(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(""), - value_for<n::if_for_install_id>(make_null_shared_ptr()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(&make_standard_output_manager) + n::config_protect() = "", + n::if_for_install_id() = make_null_shared_ptr(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = &make_standard_output_manager )); id->perform_action(action); @@ -302,9 +302,9 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo3")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root3")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo3"), + n::root() = FSEntry("installed_repository_TEST_dir/root3") ))); env.package_database()->add_repository(1, repo); @@ -320,11 +320,11 @@ namespace test_cases &env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin()); UninstallAction action(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(""), - value_for<n::if_for_install_id>(make_null_shared_ptr()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(&make_standard_output_manager) + n::config_protect() = "", + n::if_for_install_id() = make_null_shared_ptr(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = &make_standard_output_manager )); id->perform_action(action); @@ -357,9 +357,9 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo4"), + n::root() = FSEntry("installed_repository_TEST_dir/root4") ))); env.package_database()->add_repository(1, repo); @@ -376,25 +376,25 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo4"), + n::root() = FSEntry("installed_repository_TEST_dir/root4") ))); env.package_database()->add_repository(0, repo); std::tr1::shared_ptr<Repository> source_repo(new UnpackagedRepository( RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(""), - value_for<n::description>(""), - value_for<n::environment>(&env), - value_for<n::install_under>(FSEntry("/")), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/src4a")), - value_for<n::name>(QualifiedPackageName("cat/pkg4a")), - value_for<n::rewrite_ids_over_to_root>(-1), - value_for<n::run_dependencies>(""), - value_for<n::slot>(SlotName("foo")), - value_for<n::version>(VersionSpec("1.0", VersionSpecOptions())) + n::build_dependencies() = "", + n::description() = "", + n::environment() = &env, + n::install_under() = FSEntry("/"), + n::location() = FSEntry("installed_repository_TEST_dir/src4a"), + n::name() = QualifiedPackageName("cat/pkg4a"), + n::rewrite_ids_over_to_root() = -1, + n::run_dependencies() = "", + n::slot() = SlotName("foo"), + n::version() = VersionSpec("1.0", VersionSpecOptions()) ))); env.package_database()->add_repository(1, source_repo); @@ -407,11 +407,11 @@ namespace test_cases TEST_CHECK(! FSEntry("installed_repository_TEST_dir/root4/dir").exists()); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); (*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action); @@ -434,25 +434,25 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo4"), + n::root() = FSEntry("installed_repository_TEST_dir/root4") ))); env.package_database()->add_repository(0, repo); std::tr1::shared_ptr<Repository> source_repo(new UnpackagedRepository( RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(""), - value_for<n::description>(""), - value_for<n::environment>(&env), - value_for<n::install_under>(FSEntry("/")), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/src4b1")), - value_for<n::name>(QualifiedPackageName("cat/pkg4b")), - value_for<n::rewrite_ids_over_to_root>(-1), - value_for<n::run_dependencies>(""), - value_for<n::slot>(SlotName("foo")), - value_for<n::version>(VersionSpec("1.0", VersionSpecOptions())) + n::build_dependencies() = "", + n::description() = "", + n::environment() = &env, + n::install_under() = FSEntry("/"), + n::location() = FSEntry("installed_repository_TEST_dir/src4b1"), + n::name() = QualifiedPackageName("cat/pkg4b"), + n::rewrite_ids_over_to_root() = -1, + n::run_dependencies() = "", + n::slot() = SlotName("foo"), + n::version() = VersionSpec("1.0", VersionSpecOptions()) ))); env.package_database()->add_repository(1, source_repo); @@ -464,11 +464,11 @@ namespace test_cases } InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); (*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action); @@ -494,25 +494,25 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo4"), + n::root() = FSEntry("installed_repository_TEST_dir/root4") ))); env.package_database()->add_repository(0, repo); std::tr1::shared_ptr<Repository> source_repo(new UnpackagedRepository( RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(""), - value_for<n::description>(""), - value_for<n::environment>(&env), - value_for<n::install_under>(FSEntry("/")), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/src4b2")), - value_for<n::name>(QualifiedPackageName("cat/pkg4b")), - value_for<n::rewrite_ids_over_to_root>(-1), - value_for<n::run_dependencies>(""), - value_for<n::slot>(SlotName("foo")), - value_for<n::version>(VersionSpec("1.0", VersionSpecOptions())) + n::build_dependencies() = "", + n::description() = "", + n::environment() = &env, + n::install_under() = FSEntry("/"), + n::location() = FSEntry("installed_repository_TEST_dir/src4b2"), + n::name() = QualifiedPackageName("cat/pkg4b"), + n::rewrite_ids_over_to_root() = -1, + n::run_dependencies() = "", + n::slot() = SlotName("foo"), + n::version() = VersionSpec("1.0", VersionSpecOptions()) ))); env.package_database()->add_repository(1, source_repo); @@ -524,11 +524,11 @@ namespace test_cases } InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); (*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action); @@ -554,9 +554,9 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo4"), + n::root() = FSEntry("installed_repository_TEST_dir/root4") ))); env.package_database()->add_repository(0, repo); @@ -568,11 +568,11 @@ namespace test_cases } UninstallAction action(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(""), - value_for<n::if_for_install_id>(make_null_shared_ptr()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(&make_standard_output_manager) + n::config_protect() = "", + n::if_for_install_id() = make_null_shared_ptr(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = &make_standard_output_manager )); (*env[selection::RequireExactlyOne(generator::Matches( parse_user_package_dep_spec("cat/pkg4a", @@ -600,9 +600,9 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")), - value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4")) + n::environment() = &env, + n::location() = FSEntry("installed_repository_TEST_dir/repo4"), + n::root() = FSEntry("installed_repository_TEST_dir/root4") ))); env.package_database()->add_repository(0, repo); @@ -614,11 +614,11 @@ namespace test_cases } UninstallAction action(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(""), - value_for<n::if_for_install_id>(make_null_shared_ptr()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(&make_standard_output_manager) + n::config_protect() = "", + n::if_for_install_id() = make_null_shared_ptr(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = &make_standard_output_manager )); (*env[selection::RequireExactlyOne(generator::Matches( parse_user_package_dep_spec("cat/pkg4b", diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc index d18113291..7a90b4a03 100644 --- a/paludis/repositories/unpackaged/unpackaged_id.cc +++ b/paludis/repositories/unpackaged/unpackaged_id.cc @@ -377,12 +377,12 @@ UnpackagedID::perform_action(Action & action) const case wp_yes: { UnpackagedStripper stripper(make_named_values<UnpackagedStripperOptions>( - value_for<n::debug_dir>(fs_location_key()->value() / "usr" / libdir / "debug"), - value_for<n::image_dir>(fs_location_key()->value()), - value_for<n::output_manager>(output_manager), - value_for<n::package_id>(shared_from_this()), - value_for<n::split>(split_choice && split_choice->enabled()), - value_for<n::strip>(strip_choice && strip_choice->enabled()) + n::debug_dir() = fs_location_key()->value() / "usr" / libdir / "debug", + n::image_dir() = fs_location_key()->value(), + n::output_manager() = output_manager, + n::package_id() = shared_from_this(), + n::split() = split_choice && split_choice->enabled(), + n::strip() = strip_choice && strip_choice->enabled() )); stripper.strip(); @@ -408,17 +408,17 @@ UnpackagedID::perform_action(Action & action) const extra_merger_options += mo_nondestructive; (*install_action->options.destination()).destination_interface()->merge( make_named_values<MergeParams>( - value_for<n::build_start_time>(build_start_time), - value_for<n::environment_file>(FSEntry("/dev/null")), - value_for<n::image_dir>(fs_location_key()->value()), - value_for<n::merged_entries>(make_shared_ptr(new FSEntrySet)), - value_for<n::options>((MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs) - | extra_merger_options), - value_for<n::output_manager>(output_manager), - value_for<n::package_id>(shared_from_this()), - value_for<n::perform_uninstall>(install_action->options.perform_uninstall()), - value_for<n::used_this_for_config_protect>(std::tr1::bind( - &used_this_for_config_protect, std::tr1::ref(used_config_protect), std::tr1::placeholders::_1)) + n::build_start_time() = build_start_time, + n::environment_file() = FSEntry("/dev/null"), + n::image_dir() = fs_location_key()->value(), + n::merged_entries() = make_shared_ptr(new FSEntrySet), + n::options() = (MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs) + | extra_merger_options, + n::output_manager() = output_manager, + n::package_id() = shared_from_this(), + n::perform_uninstall() = install_action->options.perform_uninstall(), + n::used_this_for_config_protect() = std::tr1::bind( + &used_this_for_config_protect, std::tr1::ref(used_config_protect), std::tr1::placeholders::_1) )); } break; @@ -441,11 +441,11 @@ UnpackagedID::perform_action(Action & action) const continue; UninstallActionOptions uo(make_named_values<UninstallActionOptions>( - value_for<n::config_protect>(used_config_protect), - value_for<n::if_for_install_id>(shared_from_this()), - value_for<n::ignore_for_unmerge>(&ignore_nothing), - value_for<n::is_overwrite>(false), - value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1)) + n::config_protect() = used_config_protect, + n::if_for_install_id() = shared_from_this(), + n::ignore_for_unmerge() = &ignore_nothing, + n::is_overwrite() = false, + n::make_output_manager() = std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1) )); install_action->options.perform_uninstall()(*i, uo); } diff --git a/paludis/repositories/unpackaged/unpackaged_key.cc b/paludis/repositories/unpackaged/unpackaged_key.cc index 966168f97..563d0975d 100644 --- a/paludis/repositories/unpackaged/unpackaged_key.cc +++ b/paludis/repositories/unpackaged/unpackaged_key.cc @@ -165,13 +165,13 @@ UnpackagedChoicesKey::value() const { _imp->value.reset(new Choices); std::tr1::shared_ptr<Choice> build_options(new Choice(make_named_values<ChoiceParams>( - value_for<n::consider_added_or_changed>(false), - value_for<n::contains_every_value>(false), - value_for<n::hidden>(false), - value_for<n::human_name>(canonical_build_options_human_name()), - value_for<n::prefix>(canonical_build_options_prefix()), - value_for<n::raw_name>(canonical_build_options_raw_name()), - value_for<n::show_with_no_prefix>(false) + n::consider_added_or_changed() = false, + n::contains_every_value() = false, + n::hidden() = false, + n::human_name() = canonical_build_options_human_name(), + n::prefix() = canonical_build_options_prefix(), + n::raw_name() = canonical_build_options_raw_name(), + n::show_with_no_prefix() = false ))); build_options->add(make_shared_ptr(new ELikeSplitChoiceValue(_imp->id->shared_from_this(), _imp->env, build_options))); build_options->add(make_shared_ptr(new ELikeStripChoiceValue(_imp->id->shared_from_this(), _imp->env, build_options))); diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc index 055a37e73..ae2b0500f 100644 --- a/paludis/repositories/unpackaged/unpackaged_repository.cc +++ b/paludis/repositories/unpackaged/unpackaged_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -96,12 +96,12 @@ UnpackagedRepository::UnpackagedRepository(const RepositoryName & n, const UnpackagedRepositoryParams & params) : PrivateImplementationPattern<UnpackagedRepository>(new Implementation<UnpackagedRepository>(n, params)), Repository(params.environment(), n, make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), _imp(PrivateImplementationPattern<UnpackagedRepository>::_imp) { @@ -250,16 +250,16 @@ UnpackagedRepository::repository_factory_create( return make_shared_ptr(new UnpackagedRepository(RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(build_dependencies), - value_for<n::description>(description), - value_for<n::environment>(env), - value_for<n::install_under>(install_under), - value_for<n::location>(location), - value_for<n::name>(QualifiedPackageName(name)), - value_for<n::rewrite_ids_over_to_root>(rewrite_ids_over_to_root), - value_for<n::run_dependencies>(run_dependencies), - value_for<n::slot>(SlotName(slot)), - value_for<n::version>(VersionSpec(version, user_version_spec_options())) + n::build_dependencies() = build_dependencies, + n::description() = description, + n::environment() = env, + n::install_under() = install_under, + n::location() = location, + n::name() = QualifiedPackageName(name), + n::rewrite_ids_over_to_root() = rewrite_ids_over_to_root, + n::run_dependencies() = run_dependencies, + n::slot() = SlotName(slot), + n::version() = VersionSpec(version, user_version_spec_options()) ))); } @@ -287,7 +287,7 @@ UnpackagedRepository::populate_sets() const HookResult UnpackagedRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } bool diff --git a/paludis/repositories/unpackaged/unpackaged_repository.hh b/paludis/repositories/unpackaged/unpackaged_repository.hh index 1dd96b6e9..16bae0f34 100644 --- a/paludis/repositories/unpackaged/unpackaged_repository.hh +++ b/paludis/repositories/unpackaged/unpackaged_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -28,16 +28,16 @@ namespace paludis { namespace n { - struct build_dependencies; - struct description; - struct environment; - struct install_under; - struct location; - struct name; - struct rewrite_ids_over_to_root; - struct run_dependencies; - struct slot; - struct version; + typedef Name<struct build_dependencies_name> build_dependencies; + typedef Name<struct description_name> description; + typedef Name<struct environment_name> environment; + typedef Name<struct install_under_name> install_under; + typedef Name<struct location_name> location; + typedef Name<struct name_name> name; + typedef Name<struct rewrite_ids_over_to_root_name> rewrite_ids_over_to_root; + typedef Name<struct run_dependencies_name> run_dependencies; + typedef Name<struct slot_name> slot; + typedef Name<struct version_name> version; } namespace unpackaged_repositories diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc index d82d003f8..12666981f 100644 --- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc +++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -75,16 +75,16 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new UnpackagedRepository( RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(""), - value_for<n::description>(""), - value_for<n::environment>(&env), - value_for<n::install_under>(FSEntry("/")), - value_for<n::location>(FSEntry("unpackaged_repository_TEST_dir/pkg")), - value_for<n::name>(QualifiedPackageName("cat/pkg")), - value_for<n::rewrite_ids_over_to_root>(-1), - value_for<n::run_dependencies>(""), - value_for<n::slot>(SlotName("foo")), - value_for<n::version>(VersionSpec("1.0", VersionSpecOptions())) + n::build_dependencies() = "", + n::description() = "", + n::environment() = &env, + n::install_under() = FSEntry("/"), + n::location() = FSEntry("unpackaged_repository_TEST_dir/pkg"), + n::name() = QualifiedPackageName("cat/pkg"), + n::rewrite_ids_over_to_root() = -1, + n::run_dependencies() = "", + n::slot() = SlotName("foo"), + n::version() = VersionSpec("1.0", VersionSpecOptions()) ))); env.package_database()->add_repository(1, repo); @@ -105,16 +105,16 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new UnpackagedRepository( RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(""), - value_for<n::description>(""), - value_for<n::environment>(&env), - value_for<n::install_under>(FSEntry("/")), - value_for<n::location>(FSEntry("unpackaged_repository_TEST_dir/pkg")), - value_for<n::name>(QualifiedPackageName("cat/pkg")), - value_for<n::rewrite_ids_over_to_root>(-1), - value_for<n::run_dependencies>(""), - value_for<n::slot>(SlotName("foo")), - value_for<n::version>(VersionSpec("1.0", VersionSpecOptions())) + n::build_dependencies() = "", + n::description() = "", + n::environment() = &env, + n::install_under() = FSEntry("/"), + n::location() = FSEntry("unpackaged_repository_TEST_dir/pkg"), + n::name() = QualifiedPackageName("cat/pkg"), + n::rewrite_ids_over_to_root() = -1, + n::run_dependencies() = "", + n::slot() = SlotName("foo"), + n::version() = VersionSpec("1.0", VersionSpecOptions()) ))); env.package_database()->add_repository(1, repo); @@ -140,16 +140,16 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new UnpackagedRepository( RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(""), - value_for<n::description>(""), - value_for<n::environment>(&env), - value_for<n::install_under>(FSEntry("/")), - value_for<n::location>(FSEntry("unpackaged_repository_TEST_dir/pkg")), - value_for<n::name>(QualifiedPackageName("cat/pkg")), - value_for<n::rewrite_ids_over_to_root>(-1), - value_for<n::run_dependencies>(""), - value_for<n::slot>(SlotName("foo")), - value_for<n::version>(VersionSpec("1.0", VersionSpecOptions())) + n::build_dependencies() = "", + n::description() = "", + n::environment() = &env, + n::install_under() = FSEntry("/"), + n::location() = FSEntry("unpackaged_repository_TEST_dir/pkg"), + n::name() = QualifiedPackageName("cat/pkg"), + n::rewrite_ids_over_to_root() = -1, + n::run_dependencies() = "", + n::slot() = SlotName("foo"), + n::version() = VersionSpec("1.0", VersionSpecOptions()) ))); env.package_database()->add_repository(1, repo); @@ -170,16 +170,16 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new UnpackagedRepository( RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(""), - value_for<n::description>(""), - value_for<n::environment>(&env), - value_for<n::install_under>(FSEntry("/")), - value_for<n::location>(FSEntry("unpackaged_repository_TEST_dir/pkg")), - value_for<n::name>(QualifiedPackageName("cat/pkg")), - value_for<n::rewrite_ids_over_to_root>(-1), - value_for<n::run_dependencies>(""), - value_for<n::slot>(SlotName("foo")), - value_for<n::version>(VersionSpec("1.0", VersionSpecOptions())) + n::build_dependencies() = "", + n::description() = "", + n::environment() = &env, + n::install_under() = FSEntry("/"), + n::location() = FSEntry("unpackaged_repository_TEST_dir/pkg"), + n::name() = QualifiedPackageName("cat/pkg"), + n::rewrite_ids_over_to_root() = -1, + n::run_dependencies() = "", + n::slot() = SlotName("foo"), + n::version() = VersionSpec("1.0", VersionSpecOptions()) ))); env.package_database()->add_repository(1, repo); @@ -211,25 +211,25 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new UnpackagedRepository( RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(""), - value_for<n::description>(""), - value_for<n::environment>(&env), - value_for<n::install_under>(FSEntry("/")), - value_for<n::location>(FSEntry("unpackaged_repository_TEST_dir/pkg")), - value_for<n::name>(QualifiedPackageName("cat/pkg")), - value_for<n::rewrite_ids_over_to_root>(-1), - value_for<n::run_dependencies>(""), - value_for<n::slot>(SlotName("foo")), - value_for<n::version>(VersionSpec("1.0", VersionSpecOptions())) + n::build_dependencies() = "", + n::description() = "", + n::environment() = &env, + n::install_under() = FSEntry("/"), + n::location() = FSEntry("unpackaged_repository_TEST_dir/pkg"), + n::name() = QualifiedPackageName("cat/pkg"), + n::rewrite_ids_over_to_root() = -1, + n::run_dependencies() = "", + n::slot() = SlotName("foo"), + n::version() = VersionSpec("1.0", VersionSpecOptions()) ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<Repository> installed_repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("unpackaged_repository_TEST_dir/installed")), - value_for<n::root>(FSEntry("unpackaged_repository_TEST_dir/root")) + n::environment() = &env, + n::location() = FSEntry("unpackaged_repository_TEST_dir/installed"), + n::root() = FSEntry("unpackaged_repository_TEST_dir/root") ))); env.package_database()->add_repository(0, installed_repo); @@ -239,11 +239,11 @@ namespace test_cases *env[selection::RequireExactlyOne(generator::All())]->begin()); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); id->perform_action(action); @@ -267,25 +267,25 @@ namespace test_cases std::tr1::shared_ptr<Repository> repo(new UnpackagedRepository( RepositoryName("unpackaged"), make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>( - value_for<n::build_dependencies>(""), - value_for<n::description>(""), - value_for<n::environment>(&env), - value_for<n::install_under>(FSEntry("/magic/pixie")), - value_for<n::location>(FSEntry("unpackaged_repository_TEST_dir/under_pkg")), - value_for<n::name>(QualifiedPackageName("cat/pkg")), - value_for<n::rewrite_ids_over_to_root>(-1), - value_for<n::run_dependencies>(""), - value_for<n::slot>(SlotName("foo")), - value_for<n::version>(VersionSpec("1.0", VersionSpecOptions())) + n::build_dependencies() = "", + n::description() = "", + n::environment() = &env, + n::install_under() = FSEntry("/magic/pixie"), + n::location() = FSEntry("unpackaged_repository_TEST_dir/under_pkg"), + n::name() = QualifiedPackageName("cat/pkg"), + n::rewrite_ids_over_to_root() = -1, + n::run_dependencies() = "", + n::slot() = SlotName("foo"), + n::version() = VersionSpec("1.0", VersionSpecOptions()) ))); env.package_database()->add_repository(1, repo); std::tr1::shared_ptr<Repository> installed_repo(new InstalledUnpackagedRepository( RepositoryName("installed-unpackaged"), make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry("unpackaged_repository_TEST_dir/under_installed")), - value_for<n::root>(FSEntry("unpackaged_repository_TEST_dir/under_root")) + n::environment() = &env, + n::location() = FSEntry("unpackaged_repository_TEST_dir/under_installed"), + n::root() = FSEntry("unpackaged_repository_TEST_dir/under_root") ))); env.package_database()->add_repository(0, installed_repo); @@ -295,11 +295,11 @@ namespace test_cases *env[selection::RequireExactlyOne(generator::All())]->begin()); InstallAction action(make_named_values<InstallActionOptions>( - value_for<n::destination>(installed_repo), - value_for<n::make_output_manager>(&make_standard_output_manager), - value_for<n::perform_uninstall>(&cannot_uninstall), - value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)), - value_for<n::want_phase>(&want_all_phases) + n::destination() = installed_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = make_shared_ptr(new PackageIDSequence), + n::want_phase() = &want_all_phases )); id->perform_action(action); diff --git a/paludis/repositories/unpackaged/unpackaged_stripper.cc b/paludis/repositories/unpackaged/unpackaged_stripper.cc index ccfe4a78b..ddd7386f9 100644 --- a/paludis/repositories/unpackaged/unpackaged_stripper.cc +++ b/paludis/repositories/unpackaged/unpackaged_stripper.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -43,10 +43,10 @@ namespace paludis UnpackagedStripper::UnpackagedStripper(const UnpackagedStripperOptions & options) : Stripper(make_named_values<StripperOptions>( - value_for<n::debug_dir>(options.debug_dir()), - value_for<n::image_dir>(options.image_dir()), - value_for<n::split>(options.split()), - value_for<n::strip>(options.strip()) + n::debug_dir() = options.debug_dir(), + n::image_dir() = options.image_dir(), + n::split() = options.split(), + n::strip() = options.strip() )), PrivateImplementationPattern<UnpackagedStripper>(new Implementation<UnpackagedStripper>(options)), _imp(PrivateImplementationPattern<UnpackagedStripper>::_imp) diff --git a/paludis/repositories/unpackaged/unpackaged_stripper.hh b/paludis/repositories/unpackaged/unpackaged_stripper.hh index 4d289e21d..ce06d74e2 100644 --- a/paludis/repositories/unpackaged/unpackaged_stripper.hh +++ b/paludis/repositories/unpackaged/unpackaged_stripper.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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,12 +29,12 @@ namespace paludis { namespace n { - struct debug_dir; - struct image_dir; - struct output_manager; - struct package_id; - struct split; - struct strip; + typedef Name<struct debug_dir_name> debug_dir; + typedef Name<struct image_dir_name> image_dir; + typedef Name<struct output_manager_name> output_manager; + typedef Name<struct package_id_name> package_id; + typedef Name<struct split_name> split; + typedef Name<struct strip_name> strip; } namespace unpackaged_repositories diff --git a/paludis/repositories/unwritten/unwritten_id.hh b/paludis/repositories/unwritten/unwritten_id.hh index a5c29f7db..f253ed2c8 100644 --- a/paludis/repositories/unwritten/unwritten_id.hh +++ b/paludis/repositories/unwritten/unwritten_id.hh @@ -29,18 +29,18 @@ namespace paludis { namespace n { - struct added_by; - struct bug_ids; - struct comment; - struct description; - struct environment; - struct homepage; - struct mask; - struct name; - struct remote_ids; - struct repository; - struct slot; - struct version; + typedef Name<struct added_by_name> added_by; + typedef Name<struct bug_ids_name> bug_ids; + typedef Name<struct comment_name> comment; + typedef Name<struct description_name> description; + typedef Name<struct environment_name> environment; + typedef Name<struct homepage_name> homepage; + typedef Name<struct mask_name> mask; + typedef Name<struct name_name> name; + typedef Name<struct remote_ids_name> remote_ids; + typedef Name<struct repository_name> repository; + typedef Name<struct slot_name> slot; + typedef Name<struct version_name> version; } namespace unwritten_repository diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc index a4bab6df8..625d7f72d 100644 --- a/paludis/repositories/unwritten/unwritten_repository.cc +++ b/paludis/repositories/unwritten/unwritten_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -89,12 +89,12 @@ UnwrittenRepository::UnwrittenRepository(const UnwrittenRepositoryParams & p) : p.environment(), p.name(), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), _imp(PrivateImplementationPattern<UnwrittenRepository>::_imp) { @@ -269,14 +269,14 @@ UnwrittenRepository::sync(const std::tr1::shared_ptr<OutputManager> & output_man s_end(sync_list.end()) ; s != s_end ; ++s) { DefaultSyncer syncer(make_named_values<SyncerParams>( - value_for<n::environment>(_imp->params.environment()), - value_for<n::local>(stringify(_imp->params.location())), - value_for<n::remote>(*s) + n::environment() = _imp->params.environment(), + n::local() = stringify(_imp->params.location()), + n::remote() = *s )); SyncOptions opts(make_named_values<SyncOptions>( - value_for<n::filter_file>(FSEntry("/dev/null")), - value_for<n::options>(_imp->params.sync_options()), - value_for<n::output_manager>(output_manager) + n::filter_file() = FSEntry("/dev/null"), + n::options() = _imp->params.sync_options(), + n::output_manager() = output_manager )); try { @@ -318,11 +318,11 @@ UnwrittenRepository::repository_factory_create( return std::tr1::shared_ptr<UnwrittenRepository>(new UnwrittenRepository( make_named_values<UnwrittenRepositoryParams>( - value_for<n::environment>(env), - value_for<n::location>(location), - value_for<n::name>(RepositoryName(name_str)), - value_for<n::sync>(sync), - value_for<n::sync_options>(sync_options) + n::environment() = env, + n::location() = location, + n::name() = RepositoryName(name_str), + n::sync() = sync, + n::sync_options() = sync_options ))); } @@ -353,7 +353,7 @@ UnwrittenRepository::populate_sets() const HookResult UnwrittenRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } const std::tr1::shared_ptr<const MetadataValueKey<std::string> > diff --git a/paludis/repositories/unwritten/unwritten_repository.hh b/paludis/repositories/unwritten/unwritten_repository.hh index 44d1231ed..b4ee89aea 100644 --- a/paludis/repositories/unwritten/unwritten_repository.hh +++ b/paludis/repositories/unwritten/unwritten_repository.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -28,11 +28,11 @@ namespace paludis { namespace n { - struct environment; - struct location; - struct name; - struct sync; - struct sync_options; + typedef Name<struct environment_name> environment; + typedef Name<struct location_name> location; + typedef Name<struct name_name> name; + typedef Name<struct sync_name> sync; + typedef Name<struct sync_options_name> sync_options; } namespace unwritten_repository diff --git a/paludis/repositories/unwritten/unwritten_repository_TEST.cc b/paludis/repositories/unwritten/unwritten_repository_TEST.cc index 149d126eb..af1b1fac5 100644 --- a/paludis/repositories/unwritten/unwritten_repository_TEST.cc +++ b/paludis/repositories/unwritten/unwritten_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008 Ciaran McCreesh + * Copyright (c) 2008, 2010 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 @@ -49,11 +49,11 @@ namespace test_cases TestEnvironment env; std::tr1::shared_ptr<UnwrittenRepository> repo(new UnwrittenRepository( make_named_values<UnwrittenRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry::cwd() / "unwritten_repository_TEST_dir" / "repo1"), - value_for<n::name>(RepositoryName("unwritten")), - value_for<n::sync>(""), - value_for<n::sync_options>("") + n::environment() = &env, + n::location() = FSEntry::cwd() / "unwritten_repository_TEST_dir" / "repo1", + n::name() = RepositoryName("unwritten"), + n::sync() = "", + n::sync_options() = "" ))); env.package_database()->add_repository(1, repo); TEST_CHECK_STRINGIFY_EQUAL(repo->name(), "unwritten"); @@ -69,11 +69,11 @@ namespace test_cases TestEnvironment env; std::tr1::shared_ptr<UnwrittenRepository> repo(new UnwrittenRepository( make_named_values<UnwrittenRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::location>(FSEntry::cwd() / "unwritten_repository_TEST_dir" / "repo2"), - value_for<n::name>(RepositoryName("unwritten")), - value_for<n::sync>(""), - value_for<n::sync_options>("") + n::environment() = &env, + n::location() = FSEntry::cwd() / "unwritten_repository_TEST_dir" / "repo2", + n::name() = RepositoryName("unwritten"), + n::sync() = "", + n::sync_options() = "" ))); env.package_database()->add_repository(1, repo); TEST_CHECK_STRINGIFY_EQUAL(repo->name(), "unwritten"); diff --git a/paludis/repositories/unwritten/unwritten_repository_file.cc b/paludis/repositories/unwritten/unwritten_repository_file.cc index 863300813..e3eeb80d1 100644 --- a/paludis/repositories/unwritten/unwritten_repository_file.cc +++ b/paludis/repositories/unwritten/unwritten_repository_file.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -289,15 +289,15 @@ UnwrittenRepositoryFile::_load(const FSEntry & f) if (! entry) entry.reset(new UnwrittenRepositoryFileEntry(make_named_values<UnwrittenRepositoryFileEntry>( - value_for<n::added_by>(std::tr1::shared_ptr<const MetadataValueKey<std::string> >()), - value_for<n::bug_ids>(std::tr1::shared_ptr<const MetadataCollectionKey<Sequence<std::string> > >()), - value_for<n::comment>(std::tr1::shared_ptr<const MetadataValueKey<std::string> >()), - value_for<n::description>(std::tr1::shared_ptr<const MetadataValueKey<std::string> >()), - value_for<n::homepage>(std::tr1::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> >()), - value_for<n::name>(category + package), - value_for<n::remote_ids>(std::tr1::shared_ptr<const MetadataCollectionKey<Sequence<std::string> > >()), - value_for<n::slot>(slot), - value_for<n::version>(version) + n::added_by() = std::tr1::shared_ptr<const MetadataValueKey<std::string> >(), + n::bug_ids() = std::tr1::shared_ptr<const MetadataCollectionKey<Sequence<std::string> > >(), + n::comment() = std::tr1::shared_ptr<const MetadataValueKey<std::string> >(), + n::description() = std::tr1::shared_ptr<const MetadataValueKey<std::string> >(), + n::homepage() = std::tr1::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> >(), + n::name() = category + package, + n::remote_ids() = std::tr1::shared_ptr<const MetadataCollectionKey<Sequence<std::string> > >(), + n::slot() = slot, + n::version() = version ))); if (token == "description") diff --git a/paludis/repositories/unwritten/unwritten_repository_file.hh b/paludis/repositories/unwritten/unwritten_repository_file.hh index 752a553da..d243e9bec 100644 --- a/paludis/repositories/unwritten/unwritten_repository_file.hh +++ b/paludis/repositories/unwritten/unwritten_repository_file.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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,15 +33,15 @@ namespace paludis { namespace n { - struct added_by; - struct bug_ids; - struct comment; - struct description; - struct homepage; - struct name; - struct remote_ids; - struct slot; - struct version; + typedef Name<struct added_by_name> added_by; + typedef Name<struct bug_ids_name> bug_ids; + typedef Name<struct comment_name> comment; + typedef Name<struct description_name> description; + typedef Name<struct homepage_name> homepage; + typedef Name<struct name_name> name; + typedef Name<struct remote_ids_name> remote_ids; + typedef Name<struct slot_name> slot; + typedef Name<struct version_name> version; } namespace unwritten_repository diff --git a/paludis/repositories/unwritten/unwritten_repository_store.cc b/paludis/repositories/unwritten/unwritten_repository_store.cc index b96186087..c18b99594 100644 --- a/paludis/repositories/unwritten/unwritten_repository_store.cc +++ b/paludis/repositories/unwritten/unwritten_repository_store.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2008, 2009 Ciaran McCreesh + * Copyright (c) 2008, 2009, 2010 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 @@ -134,18 +134,18 @@ UnwrittenRepositoryStore::_populate_one(const Environment * const env, const FSE } ids->push_back(make_shared_ptr(new UnwrittenID(make_named_values<UnwrittenIDParams>( - value_for<n::added_by>((*i).added_by()), - value_for<n::bug_ids>((*i).bug_ids()), - value_for<n::comment>((*i).comment()), - value_for<n::description>((*i).description()), - value_for<n::environment>(env), - value_for<n::homepage>((*i).homepage()), - value_for<n::mask>(mask), - value_for<n::name>((*i).name()), - value_for<n::remote_ids>((*i).remote_ids()), - value_for<n::repository>(_imp->repo), - value_for<n::slot>((*i).slot()), - value_for<n::version>((*i).version()) + n::added_by() = (*i).added_by(), + n::bug_ids() = (*i).bug_ids(), + n::comment() = (*i).comment(), + n::description() = (*i).description(), + n::environment() = env, + n::homepage() = (*i).homepage(), + n::mask() = mask, + n::name() = (*i).name(), + n::remote_ids() = (*i).remote_ids(), + n::repository() = _imp->repo, + n::slot() = (*i).slot(), + n::version() = (*i).version() )))); old_name = (*i).name(); diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc index be83fc9be..33cea8864 100644 --- a/paludis/repositories/virtuals/installed_virtuals_repository.cc +++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -110,12 +110,12 @@ namespace InstalledVirtualsRepository::InstalledVirtualsRepository(const Environment * const env, const FSEntry & r) : Repository(env, RepositoryName(make_name(r)), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(this)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(this), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0), + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), PrivateImplementationPattern<InstalledVirtualsRepository>( new Implementation<InstalledVirtualsRepository>(env, r)), @@ -237,7 +237,7 @@ InstalledVirtualsRepository::perform_hook(const Hook & hook) Context context("When performing hook '" + stringify(hook.name()) + "' for repository '" + stringify(name()) + "':"); - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } bool diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc index 25781e80c..53433f180 100644 --- a/paludis/repositories/virtuals/package_id.cc +++ b/paludis/repositories/virtuals/package_id.cc @@ -71,8 +71,8 @@ namespace paludis make_package_dep_spec(PartiallyMadePackageDepSpecOptions()) .package(v->name()) .version_requirement(make_named_values<VersionRequirement>( - value_for<n::version_operator>(vo_equal), - value_for<n::version_spec>(v->version()))) + n::version_operator() = vo_equal, + n::version_spec() = v->version())) .slot_requirement(make_shared_ptr(new UserSlotExactRequirement( v->slot_key() ? v->slot_key()->value() : SlotName("UNKNOWN")))) .in_repository(v->repository()->name()))) diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc index fcfb89eca..c26a33878 100644 --- a/paludis/repositories/virtuals/virtuals_repository.cc +++ b/paludis/repositories/virtuals/virtuals_repository.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010 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 @@ -122,12 +122,12 @@ namespace VirtualsRepository::VirtualsRepository(const Environment * const env) : Repository(env, RepositoryName("virtuals"), make_named_values<RepositoryCapabilities>( - value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)), - value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)), - value_for<n::make_virtuals_interface>(this), - value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)), - value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)), - value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0)) + n::destination_interface() = static_cast<RepositoryDestinationInterface *>(0), + n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0), + n::make_virtuals_interface() = this, + n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0), + n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0), + n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0) )), PrivateImplementationPattern<VirtualsRepository>( new Implementation<VirtualsRepository>(env)), @@ -463,7 +463,7 @@ VirtualsRepository::populate_sets() const HookResult VirtualsRepository::perform_hook(const Hook &) { - return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>("")); + return make_named_values<HookResult>(n::max_exit_status() = 0, n::output() = ""); } bool diff --git a/paludis/repositories/virtuals/virtuals_repository_TEST.cc b/paludis/repositories/virtuals/virtuals_repository_TEST.cc index 90f5e31bc..a93565266 100644 --- a/paludis/repositories/virtuals/virtuals_repository_TEST.cc +++ b/paludis/repositories/virtuals/virtuals_repository_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010 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 @@ -52,15 +52,15 @@ namespace test_cases TestEnvironment env; std::tr1::shared_ptr<VirtualsRepository> virtuals(new VirtualsRepository(&env)); const std::tr1::shared_ptr<FakeRepository> repo(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo")) + n::environment() = &env, + n::name() = RepositoryName("repo") ))); std::tr1::shared_ptr<FakeInstalledRepository> installed(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); TEST_CHECK(repo->virtuals_interface()); @@ -95,19 +95,19 @@ namespace test_cases TestEnvironment env; std::tr1::shared_ptr<VirtualsRepository> virtuals(new VirtualsRepository(&env)); const std::tr1::shared_ptr<FakeRepository> repo1(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo1")) + n::environment() = &env, + n::name() = RepositoryName("repo1") ))); const std::tr1::shared_ptr<FakeRepository> repo2(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo2")) + n::environment() = &env, + n::name() = RepositoryName("repo2") ))); std::tr1::shared_ptr<FakeInstalledRepository> installed(new FakeInstalledRepository( make_named_values<FakeInstalledRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("installed")), - value_for<n::suitable_destination>(true), - value_for<n::supports_uninstall>(true) + n::environment() = &env, + n::name() = RepositoryName("installed"), + n::suitable_destination() = true, + n::supports_uninstall() = true ))); env.package_database()->add_repository(2, virtuals); @@ -148,12 +148,12 @@ namespace test_cases TestEnvironment env; std::tr1::shared_ptr<VirtualsRepository> virtuals(new VirtualsRepository(&env)); const std::tr1::shared_ptr<FakeRepository> repo1(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo1")) + n::environment() = &env, + n::name() = RepositoryName("repo1") ))); const std::tr1::shared_ptr<FakeRepository> repo2(new FakeRepository(make_named_values<FakeRepositoryParams>( - value_for<n::environment>(&env), - value_for<n::name>(RepositoryName("repo2")) + n::environment() = &env, + n::name() = RepositoryName("repo2") ))); env.package_database()->add_repository(2, repo1); |