aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-04 23:30:24 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-04 23:30:24 +0000
commitfe2acbbfa936d6593e4456c373cfe4f433dc0c4f (patch)
tree9d1dc0d2d7b5f9bfce913f7417af483d69a74a17
parent50300ac23003d16659efbf7e749ac2a79dd58e6d (diff)
downloadpaludis-fe2acbbfa936d6593e4456c373cfe4f433dc0c4f.tar.gz
paludis-fe2acbbfa936d6593e4456c373cfe4f433dc0c4f.tar.xz
kill some sr
-rw-r--r--paludis/repositories/e/Makefile.am54
-rw-r--r--paludis/repositories/e/e_installed_repository.cc44
-rw-r--r--paludis/repositories/e/e_installed_repository.hh17
-rw-r--r--paludis/repositories/e/e_installed_repository.sr16
-rw-r--r--paludis/repositories/e/e_repository.cc193
-rw-r--r--paludis/repositories/e/e_repository.hh4
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc6
-rw-r--r--paludis/repositories/e/e_repository_news.cc16
-rw-r--r--paludis/repositories/e/e_repository_news.hh4
-rw-r--r--paludis/repositories/e/e_repository_params.cc1
-rw-r--r--paludis/repositories/e/e_repository_params.hh68
-rw-r--r--paludis/repositories/e/e_repository_params.sr50
-rw-r--r--paludis/repositories/e/e_repository_profile.cc22
-rw-r--r--paludis/repositories/e/e_repository_sets.cc16
-rw-r--r--paludis/repositories/e/e_repository_sets.hh2
-rw-r--r--paludis/repositories/e/ebuild.cc6
-rw-r--r--paludis/repositories/e/ebuild_entries.cc170
-rw-r--r--paludis/repositories/e/ebuild_id.cc26
-rw-r--r--paludis/repositories/e/exheres_layout.cc30
-rw-r--r--paludis/repositories/e/exndbam_repository.cc59
-rw-r--r--paludis/repositories/e/exndbam_repository.hh22
-rw-r--r--paludis/repositories/e/exndbam_repository.sr17
-rw-r--r--paludis/repositories/e/qa/categories.cc2
-rw-r--r--paludis/repositories/e/qa/qa_controller.cc14
-rw-r--r--paludis/repositories/e/qa/visibility.cc6
-rw-r--r--paludis/repositories/e/traditional_layout.cc30
-rw-r--r--paludis/repositories/e/vdb_repository.cc116
-rw-r--r--paludis/repositories/e/vdb_repository.hh30
-rw-r--r--paludis/repositories/e/vdb_repository.sr29
29 files changed, 510 insertions, 560 deletions
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index 39dce68..a08b3d1 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -1,10 +1,7 @@
SUBDIRS = eapis ebuild . qa
CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda *.loT *.epicfail
DISTCLEANFILES = \
- e_installed_repository-sr.hh e_installed_repository-sr.cc \
- e_repository_params-sr.hh e_repository_params-sr.cc \
e_repository_params-se.hh e_repository_params-se.cc \
- vdb_repository-sr.hh vdb_repository-sr.cc \
dep_parser-se.hh dep_parser-se.cc \
iuse-se.hh iuse-se.cc
@@ -37,7 +34,6 @@ paludis_repositories_e_include_HEADERS = \
dependencies_rewriter.hh \
e_choice_value.hh \
e_installed_repository.hh \
- e_installed_repository-sr.hh \
e_installed_repository_id.hh \
e_key.hh \
e_mask.hh \
@@ -47,7 +43,6 @@ paludis_repositories_e_include_HEADERS = \
e_repository_id.hh \
e_repository_mask_file.hh \
e_repository_news.hh \
- e_repository_params-sr.hh \
e_repository_params-se.hh \
e_repository_params.hh \
e_repository_profile.hh \
@@ -65,7 +60,6 @@ paludis_repositories_e_include_HEADERS = \
exheres_layout.hh \
exndbam_id.hh \
exndbam_repository.hh \
- exndbam_repository-sr.hh \
extra_distribution_data.hh \
fetch_visitor.hh \
info_metadata_key.hh \
@@ -87,7 +81,6 @@ paludis_repositories_e_include_HEADERS = \
vdb_contents_tokeniser.hh \
vdb_id.hh \
vdb_merger.hh \
- vdb_repository-sr.hh \
vdb_repository.hh \
vdb_unmerger.hh
@@ -331,12 +324,6 @@ EXTRA_DIST = \
e_repository_TEST.cc \
e_repository_TEST_setup.sh \
e_repository_TEST_cleanup.sh \
- e_installed_repository-sr.hh \
- e_installed_repository-sr.cc \
- e_installed_repository.sr \
- e_repository_params-sr.hh \
- e_repository_params-sr.cc \
- e_repository_params.sr \
e_repository_params-se.hh \
e_repository_params-se.cc \
e_repository_params.se \
@@ -349,9 +336,6 @@ EXTRA_DIST = \
exndbam_repository_TEST.cc \
exndbam_repository_TEST_setup.sh \
exndbam_repository_TEST_cleanup.sh \
- exndbam_repository-sr.hh \
- exndbam_repository-sr.cc \
- exndbam_repository.sr \
fetch_visitor_TEST.cc \
fetch_visitor_TEST_setup.sh \
fetch_visitor_TEST_cleanup.sh \
@@ -366,9 +350,6 @@ EXTRA_DIST = \
vdb_repository_TEST.cc \
vdb_repository_TEST_setup.sh \
vdb_repository_TEST_cleanup.sh \
- vdb_repository-sr.hh \
- vdb_repository-sr.cc \
- vdb_repository.sr \
vdb_merger_TEST.cc \
vdb_merger_TEST_setup.sh \
vdb_merger_TEST_cleanup.sh \
@@ -379,18 +360,10 @@ EXTRA_DIST = \
BUILT_SOURCES = \
dep_parser-se.hh \
dep_parser-se.cc \
- e_installed_repository-sr.hh \
- e_installed_repository-sr.cc \
- e_repository_params-sr.hh \
- e_repository_params-sr.cc \
e_repository_params-se.hh \
e_repository_params-se.cc \
iuse-se.hh \
- iuse-se.cc \
- exndbam_repository-sr.hh \
- exndbam_repository-sr.cc \
- vdb_repository-sr.hh \
- vdb_repository-sr.cc
+ iuse-se.cc
check_SCRIPTS = \
e_repository_TEST_setup.sh e_repository_TEST_cleanup.sh \
@@ -424,30 +397,6 @@ TESTS_ENVIRONMENT = env \
$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/.libs/`" \
bash $(top_srcdir)/test/run_test.sh
-e_installed_repository-sr.hh : e_installed_repository.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/e_installed_repository.sr > $@
-
-e_installed_repository-sr.cc : e_installed_repository.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/e_installed_repository.sr > $@
-
-e_repository_params-sr.hh : e_repository_params.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/e_repository_params.sr > $@
-
-e_repository_params-sr.cc : e_repository_params.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/e_repository_params.sr > $@
-
-exndbam_repository-sr.hh : exndbam_repository.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/exndbam_repository.sr > $@
-
-exndbam_repository-sr.cc : exndbam_repository.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/exndbam_repository.sr > $@
-
-vdb_repository-sr.hh : vdb_repository.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/vdb_repository.sr > $@
-
-vdb_repository-sr.cc : vdb_repository.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/vdb_repository.sr > $@
-
dep_parser-se.hh : dep_parser.se $(top_srcdir)/misc/make_se.bash
if ! $(top_srcdir)/misc/make_se.bash --header $(srcdir)/dep_parser.se > $@ ; then rm -f $@ ; exit 1 ; fi
@@ -466,7 +415,6 @@ e_repository_params-se.hh : e_repository_params.se $(top_srcdir)/misc/make_se.ba
e_repository_params-se.cc : e_repository_params.se $(top_srcdir)/misc/make_se.bash
if ! $(top_srcdir)/misc/make_se.bash --source $(srcdir)/e_repository_params.se > $@ ; then rm -f $@ ; exit 1 ; fi
-
libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@_la_SOURCES = xml_things.cc xml_things.hh
libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@_la_CXXFLAGS = $(AM_CXXFLAGS) @LIBXML2DEPS_CFLAGS@
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 9425199..4763b90 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -49,8 +49,6 @@
using namespace paludis;
using namespace paludis::erepository;
-#include <paludis/repositories/e/e_installed_repository-sr.cc>
-
namespace paludis
{
template <>
@@ -68,7 +66,7 @@ namespace paludis
EInstalledRepository::EInstalledRepository(const EInstalledRepositoryParams & p,
const RepositoryName & n, const RepositoryCapabilities & c) :
- Repository(p.environment, n, c),
+ Repository(p.environment(), n, c),
PrivateImplementationPattern<EInstalledRepository>(new Implementation<EInstalledRepository>(p)),
_imp(PrivateImplementationPattern<EInstalledRepository>::_imp)
{
@@ -145,7 +143,7 @@ EInstalledRepository::is_suitable_destination_for(const PackageID & e) const
bool
EInstalledRepository::is_default_destination() const
{
- return _imp->params.environment->root() == installed_root_key()->value();
+ return _imp->params.environment()->root() == installed_root_key()->value();
}
bool
@@ -195,18 +193,18 @@ EInstalledRepository::package_set(const SetName & s) const
}
else if ("world" == s.data())
{
- if (_imp->params.deprecated_world.exists())
+ if (_imp->params.deprecated_world().exists())
{
std::tr1::shared_ptr<GeneralSetDepTag> tag(new GeneralSetDepTag(SetName("world"), stringify(name())));
SetFile world(SetFileParams::create()
- .file_name(_imp->params.deprecated_world)
+ .file_name(_imp->params.deprecated_world())
.type(sft_simple)
.parser(std::tr1::bind(&parse_user_package_dep_spec, _1,
- _imp->params.environment, UserPackageDepSpecOptions() + updso_no_disambiguation + updso_throw_if_set, filter::All()))
+ _imp->params.environment(), UserPackageDepSpecOptions() + updso_no_disambiguation + updso_throw_if_set, filter::All()))
.tag(tag)
.set_operator_mode(sfsmo_natural)
- .environment(_imp->params.environment));
+ .environment(_imp->params.environment()));
return world.contents();
}
@@ -224,7 +222,7 @@ EInstalledRepository::sets_list() const
std::tr1::shared_ptr<SetNameSet> result(new SetNameSet);
result->insert(SetName("everything"));
- if (_imp->params.deprecated_world.exists())
+ if (_imp->params.deprecated_world().exists())
result->insert(SetName("world"));
return result;
}
@@ -280,9 +278,9 @@ EInstalledRepository::perform_config(const std::tr1::shared_ptr<const ERepositor
{
Context context("When configuring '" + stringify(*id) + "':");
- if (! _imp->params.root.is_directory())
+ if (! _imp->params.root().is_directory())
throw InstallActionError("Couldn't configure '" + stringify(*id) +
- "' because root ('" + stringify(_imp->params.root) + "') is not a directory");
+ "' because root ('" + stringify(_imp->params.root()) + "') is not a directory");
FSEntry ver_dir(id->fs_location_key()->value());
@@ -296,13 +294,13 @@ EInstalledRepository::perform_config(const std::tr1::shared_ptr<const ERepositor
phase != phase_end ; ++phase)
{
EbuildConfigCommand config_cmd(make_named_values<EbuildCommandParams>(
- value_for<n::builddir>(_imp->params.builddir),
+ value_for<n::builddir>(_imp->params.builddir()),
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::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
value_for<n::files_dir>(ver_dir),
value_for<n::package_id>(id),
@@ -313,7 +311,7 @@ EInstalledRepository::perform_config(const std::tr1::shared_ptr<const ERepositor
make_named_values<EbuildConfigCommandParams>(
value_for<n::load_environment>(load_env.get()),
- value_for<n::root>(stringify(_imp->params.root))
+ value_for<n::root>(stringify(_imp->params.root()))
));
config_cmd();
@@ -325,9 +323,9 @@ EInstalledRepository::perform_info(const std::tr1::shared_ptr<const ERepositoryI
{
Context context("When infoing '" + stringify(*id) + "':");
- if (! _imp->params.root.is_directory())
+ if (! _imp->params.root().is_directory())
throw InstallActionError("Couldn't info '" + stringify(*id) +
- "' because root ('" + stringify(_imp->params.root) + "') is not a directory");
+ "' because root ('" + stringify(_imp->params.root()) + "') is not a directory");
FSEntry ver_dir(id->fs_location_key()->value());
@@ -353,10 +351,10 @@ EInstalledRepository::perform_info(const std::tr1::shared_ptr<const ERepositoryI
o != o_end ; ++o)
{
RepositoryName rn(*o);
- if (_imp->params.environment->package_database()->has_repository_named(rn))
+ if (_imp->params.environment()->package_database()->has_repository_named(rn))
{
const std::tr1::shared_ptr<const Repository> r(
- _imp->params.environment->package_database()->fetch_repository(rn));
+ _imp->params.environment()->package_database()->fetch_repository(rn));
Repository::MetadataConstIterator m(r->find_metadata("info_vars"));
if (r->end_metadata() != m)
{
@@ -376,8 +374,8 @@ EInstalledRepository::perform_info(const std::tr1::shared_ptr<const ERepositoryI
if (! i)
{
for (PackageDatabase::RepositoryConstIterator
- r(_imp->params.environment->package_database()->begin_repositories()),
- r_end(_imp->params.environment->package_database()->end_repositories()) ;
+ r(_imp->params.environment()->package_database()->begin_repositories()),
+ r_end(_imp->params.environment()->package_database()->end_repositories()) ;
r != r_end ; ++r)
{
Repository::MetadataConstIterator m((*r)->find_metadata("info_vars"));
@@ -395,13 +393,13 @@ EInstalledRepository::perform_info(const std::tr1::shared_ptr<const ERepositoryI
}
EbuildInfoCommand info_cmd(make_named_values<EbuildCommandParams>(
- value_for<n::builddir>(_imp->params.builddir),
+ value_for<n::builddir>(_imp->params.builddir()),
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::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
value_for<n::files_dir>(ver_dir),
value_for<n::package_id>(id),
@@ -415,7 +413,7 @@ EInstalledRepository::perform_info(const std::tr1::shared_ptr<const ERepositoryI
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::root>(stringify(_imp->params.root)),
+ value_for<n::root>(stringify(_imp->params.root())),
value_for<n::use>(""),
value_for<n::use_ebuild_file>(false),
value_for<n::use_expand>(""),
diff --git a/paludis/repositories/e/e_installed_repository.hh b/paludis/repositories/e/e_installed_repository.hh
index 5b0049d..c922dce 100644
--- a/paludis/repositories/e/e_installed_repository.hh
+++ b/paludis/repositories/e/e_installed_repository.hh
@@ -25,10 +25,23 @@
namespace paludis
{
- namespace erepository
+ namespace n
{
+ struct builddir;
+ struct deprecated_world;
+ struct environment;
+ struct root;
+ }
-#include <paludis/repositories/e/e_installed_repository-sr.hh>
+ namespace erepository
+ {
+ struct EInstalledRepositoryParams
+ {
+ NamedValue<n::builddir, FSEntry> builddir;
+ NamedValue<n::deprecated_world, FSEntry> deprecated_world;
+ NamedValue<n::environment, Environment *> environment;
+ NamedValue<n::root, FSEntry> root;
+ };
class EInstalledRepository :
public Repository,
diff --git a/paludis/repositories/e/e_installed_repository.sr b/paludis/repositories/e/e_installed_repository.sr
deleted file mode 100644
index 8383368..0000000
--- a/paludis/repositories/e/e_installed_repository.sr
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-make_class_EInstalledRepositoryParams()
-{
- visible
-
- key environment "Environment *"
- key deprecated_world "FSEntry"
- key root "FSEntry"
- key builddir "FSEntry"
-
- allow_named_args
-}
-
-
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index d8784ab..0e90717 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -128,7 +128,7 @@ namespace
result.reset(new FSEntrySequence);
for (ERepositorySequence::ConstIterator e(r->begin()), e_end(r->end()) ;
e != e_end ; ++e)
- result->push_back((*e)->params().location);
+ result->push_back((*e)->location_key()->value());
}
return result;
@@ -241,68 +241,68 @@ namespace paludis
repo(r),
params(p),
mutexes(m),
- names_cache(new RepositoryNameCache(p.names_cache, r)),
+ names_cache(new RepositoryNameCache(p.names_cache(), r)),
has_repo_mask(false),
has_mirrors(false),
has_profiles_desc(false),
- sets_ptr(new ERepositorySets(params.environment, r, p)),
- entries_ptr(ERepositoryEntriesFactory::get_instance()->create(params.entry_format, params.environment, r, p)),
- layout(LayoutFactory::get_instance()->create(params.layout, r, params.location, entries_ptr, get_master_locations(
- params.master_repositories))),
+ sets_ptr(new ERepositorySets(params.environment(), r, p)),
+ entries_ptr(ERepositoryEntriesFactory::get_instance()->create(params.entry_format(), params.environment(), r, p)),
+ layout(LayoutFactory::get_instance()->create(params.layout(), r, params.location(), entries_ptr, get_master_locations(
+ params.master_repositories()))),
format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
- mkt_significant, params.entry_format)),
+ mkt_significant, params.entry_format())),
layout_key(new LiteralMetadataValueKey<std::string> ("layout", "layout",
- mkt_normal, params.layout)),
+ mkt_normal, params.layout())),
location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
- mkt_significant, params.location)),
+ mkt_significant, params.location())),
profiles_key(new LiteralMetadataFSEntrySequenceKey(
- "profiles", "profiles", mkt_normal, params.profiles)),
+ "profiles", "profiles", mkt_normal, params.profiles())),
cache_key(new LiteralMetadataValueKey<FSEntry> ("cache", "cache",
- mkt_normal, params.cache)),
+ mkt_normal, params.cache())),
write_cache_key(new LiteralMetadataValueKey<FSEntry> ("write_cache", "write_cache",
- mkt_normal, params.write_cache)),
+ mkt_normal, params.write_cache())),
append_repository_name_to_write_cache_key(new LiteralMetadataValueKey<std::string> (
"append_repository_name_to_write_cache", "append_repository_name_to_write_cache",
- mkt_normal, stringify(params.append_repository_name_to_write_cache))),
+ mkt_normal, stringify(params.append_repository_name_to_write_cache()))),
ignore_deprecated_profiles(new LiteralMetadataValueKey<std::string> (
"ignore_deprecated_profiles", "ignore_deprecated_profiles",
- mkt_normal, stringify(params.ignore_deprecated_profiles))),
+ mkt_normal, stringify(params.ignore_deprecated_profiles()))),
names_cache_key(new LiteralMetadataValueKey<FSEntry> (
- "names_cache", "names_cache", mkt_normal, params.names_cache)),
+ "names_cache", "names_cache", mkt_normal, params.names_cache())),
distdir_key(new LiteralMetadataValueKey<FSEntry> (
- "distdir", "distdir", mkt_normal, params.distdir)),
+ "distdir", "distdir", mkt_normal, params.distdir())),
eclassdirs_key(new LiteralMetadataFSEntrySequenceKey(
- "eclassdirs", "eclassdirs", mkt_normal, params.eclassdirs)),
+ "eclassdirs", "eclassdirs", mkt_normal, params.eclassdirs())),
securitydir_key(new LiteralMetadataValueKey<FSEntry> (
- "securitydir", "securitydir", mkt_normal, params.securitydir)),
+ "securitydir", "securitydir", mkt_normal, params.securitydir())),
setsdir_key(new LiteralMetadataValueKey<FSEntry> (
- "setsdir", "setsdir", mkt_normal, params.setsdir)),
+ "setsdir", "setsdir", mkt_normal, params.setsdir())),
newsdir_key(new LiteralMetadataValueKey<FSEntry> (
- "newsdir", "newsdir", mkt_normal, params.newsdir)),
+ "newsdir", "newsdir", mkt_normal, params.newsdir())),
sync_key(new LiteralMetadataValueKey<std::string> (
- "sync", "sync", mkt_normal, params.sync)),
+ "sync", "sync", mkt_normal, params.sync())),
sync_options_key(new LiteralMetadataValueKey<std::string> (
- "sync_options", "sync_options", mkt_normal, params.sync_options)),
+ "sync_options", "sync_options", mkt_normal, params.sync_options())),
builddir_key(new LiteralMetadataValueKey<FSEntry> (
- "builddir", "builddir", mkt_normal, params.builddir)),
- master_repositories_key(params.master_repositories ?
+ "builddir", "builddir", mkt_normal, params.builddir())),
+ master_repositories_key(params.master_repositories() ?
std::tr1::shared_ptr<MetadataCollectionKey<Sequence<std::string> > >(new LiteralMetadataStringSequenceKey(
- "master_repository", "master_repository", mkt_normal, get_master_names(params.master_repositories))) :
+ "master_repository", "master_repository", mkt_normal, get_master_names(params.master_repositories()))) :
std::tr1::shared_ptr<MetadataCollectionKey<Sequence<std::string> > >()),
eapi_when_unknown_key(new LiteralMetadataValueKey<std::string> (
- "eapi_when_unknown", "eapi_when_unknown", mkt_normal, params.eapi_when_unknown)),
+ "eapi_when_unknown", "eapi_when_unknown", mkt_normal, params.eapi_when_unknown())),
eapi_when_unspecified_key(new LiteralMetadataValueKey<std::string> (
- "eapi_when_unspecified", "eapi_when_unspecified", mkt_normal, params.eapi_when_unspecified)),
+ "eapi_when_unspecified", "eapi_when_unspecified", mkt_normal, params.eapi_when_unspecified())),
profile_eapi_key(new LiteralMetadataValueKey<std::string> (
- "profile_eapi", "profile_eapi", mkt_normal, params.profile_eapi)),
+ "profile_eapi", "profile_eapi", mkt_normal, params.profile_eapi())),
use_manifest_key(new LiteralMetadataValueKey<std::string> (
- "use_manifest", "use_manifest", mkt_normal, stringify(params.use_manifest))),
+ "use_manifest", "use_manifest", mkt_normal, stringify(params.use_manifest()))),
info_pkgs_key(layout->info_packages_files()->end() != std::find_if(layout->info_packages_files()->begin(),
layout->info_packages_files()->end(),
std::tr1::bind(std::tr1::mem_fn(&FSEntry::is_regular_file_or_symlink_to_regular_file),
std::tr1::placeholders::_1)) ?
- make_shared_ptr(new InfoPkgsMetadataKey(params.environment, layout->info_packages_files(),
- params.profile_eapi)) :
+ make_shared_ptr(new InfoPkgsMetadataKey(params.environment(), layout->info_packages_files(),
+ params.profile_eapi())) :
std::tr1::shared_ptr<InfoPkgsMetadataKey>()
),
info_vars_key(layout->info_variables_files()->end() != std::find_if(layout->info_variables_files()->begin(),
@@ -313,11 +313,11 @@ namespace paludis
std::tr1::shared_ptr<InfoVarsMetadataKey>()
),
binary_destination_key(new LiteralMetadataValueKey<std::string> (
- "binary_destination", "binary_destination", mkt_normal, stringify(params.binary_destination))),
+ "binary_destination", "binary_destination", mkt_normal, stringify(params.binary_destination()))),
binary_src_uri_prefix_key(new LiteralMetadataValueKey<std::string> (
- "binary_uri_prefix", "binary_uri_prefix", mkt_normal, params.binary_uri_prefix)),
+ "binary_uri_prefix", "binary_uri_prefix", mkt_normal, params.binary_uri_prefix())),
binary_keywords(new LiteralMetadataValueKey<std::string> (
- "binary_keywords", "binary_keywords", mkt_normal, params.binary_keywords))
+ "binary_keywords", "binary_keywords", mkt_normal, params.binary_keywords()))
{
}
@@ -334,9 +334,9 @@ namespace paludis
return;
profile_ptr.reset(new ERepositoryProfile(
- params.environment, repo, repo->name(), *params.profiles,
+ params.environment(), repo, repo->name(), *params.profiles(),
EAPIData::get_instance()->eapi_from_string(
- params.eapi_when_unknown)->supported()->ebuild_environment_variables()->env_arch()));
+ params.eapi_when_unknown())->supported()->ebuild_environment_variables()->env_arch()));
}
void
@@ -378,9 +378,9 @@ namespace paludis
value_for<n::arch>(tokens.at(0)),
value_for<n::path>(*profiles.begin()),
value_for<n::profile>(std::tr1::shared_ptr<ERepositoryProfile>(new ERepositoryProfile(
- params.environment, repo, repo->name(), profiles,
+ params.environment(), repo, repo->name(), profiles,
EAPIData::get_instance()->eapi_from_string(
- params.eapi_when_unknown)->supported()->ebuild_environment_variables()->env_arch()))),
+ params.eapi_when_unknown())->supported()->ebuild_environment_variables()->env_arch()))),
value_for<n::status>(tokens.at(2))
));
}
@@ -453,10 +453,10 @@ namespace
ERepository::ERepository(const ERepositoryParams & p) :
Repository(
- p.environment,
- fetch_repo_name(p.location),
+ p.environment(),
+ fetch_repo_name(p.location()),
make_named_values<RepositoryCapabilities>(
- value_for<n::destination_interface>(p.binary_destination ? this : 0),
+ value_for<n::destination_interface>(p.binary_destination() ? this : 0),
value_for<n::e_interface>(this),
value_for<n::environment_variable_interface>(this),
value_for<n::hook_interface>(this),
@@ -471,7 +471,7 @@ ERepository::ERepository(const ERepositoryParams & p) :
#endif
value_for<n::sets_interface>(this),
value_for<n::syncable_interface>(this),
- value_for<n::virtuals_interface>((*DistributionData::get_instance()->distribution_from_string(p.environment->distribution())).support_old_style_virtuals() ? this : 0)
+ value_for<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)
@@ -574,7 +574,7 @@ ERepository::repository_masked(const PackageID & id) const
std::tr1::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(parse_elike_package_dep_spec(
line->first,
EAPIData::get_instance()->eapi_from_string(
- _imp->params.profile_eapi)->supported()->package_dep_spec_parse_options(),
+ _imp->params.profile_eapi())->supported()->package_dep_spec_parse_options(),
std::tr1::shared_ptr<const PackageID>())));
if (a->package_ptr())
_imp->repo_mask[*a->package_ptr()].push_back(std::make_pair(a, line->second));
@@ -604,7 +604,7 @@ ERepository::repository_masked(const PackageID & id) const
else
for (std::list<std::pair<std::tr1::shared_ptr<const PackageDepSpec>, std::tr1::shared_ptr<const RepositoryMaskInfo> > >::const_iterator
k(r->second.begin()), k_end(r->second.end()) ; k != k_end ; ++k)
- if (match_package(*_imp->params.environment, *k->first, id, MatchPackageOptions()))
+ if (match_package(*_imp->params.environment(), *k->first, id, MatchPackageOptions()))
return k->second;
return std::tr1::shared_ptr<const RepositoryMaskInfo>();
@@ -682,7 +682,7 @@ ERepository::need_mirrors() const
if (! found_one)
Log::get_instance()->message("e.thirdpartymirrors.missing", ll_warning, lc_no_context) <<
"No thirdpartymirrors file found in '"
- << (_imp->params.location / "profiles") << "', so mirror:// SRC_URI "
+ << (_imp->params.location() / "profiles") << "', so mirror:// SRC_URI "
"components cannot be fetched";
_imp->has_mirrors = true;
@@ -712,24 +712,24 @@ ERepository::sync(const std::tr1::shared_ptr<const OutputDeviant> & output_devia
{
Context context("When syncing repository '" + stringify(name()) + "':");
- if (_imp->params.sync.empty())
+ if (_imp->params.sync().empty())
return false;
std::list<std::string> sync_list;
- tokenise_whitespace(_imp->params.sync, std::back_inserter(sync_list));
+ tokenise_whitespace(_imp->params.sync(), std::back_inserter(sync_list));
bool ok(false);
for (std::list<std::string>::const_iterator s(sync_list.begin()),
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::environment>(_imp->params.environment()),
+ value_for<n::local>(stringify(_imp->params.location())),
value_for<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::options>(_imp->params.sync_options()),
value_for<n::output_deviant>(output_deviant),
value_for<n::output_prefix>("sync " + stringify(name()) + "> ")
));
@@ -747,7 +747,7 @@ ERepository::sync(const std::tr1::shared_ptr<const OutputDeviant> & output_devia
}
if (! ok)
- throw SyncFailedError(stringify(_imp->params.location), _imp->params.sync);
+ throw SyncFailedError(stringify(_imp->params.location()), _imp->params.sync());
return true;
}
@@ -764,10 +764,10 @@ ERepository::invalidate_masks()
{
_imp->layout->invalidate_masks();
- if ((*DistributionData::get_instance()->distribution_from_string(_imp->params.environment->distribution()))
+ if ((*DistributionData::get_instance()->distribution_from_string(_imp->params.environment()->distribution()))
.support_old_style_virtuals())
- if (_imp->params.environment->package_database()->has_repository_named(RepositoryName("virtuals")))
- _imp->params.environment->package_database()->fetch_repository(
+ if (_imp->params.environment()->package_database()->has_repository_named(RepositoryName("virtuals")))
+ _imp->params.environment()->package_database()->fetch_repository(
RepositoryName("virtuals"))->invalidate_masks();
}
@@ -777,7 +777,7 @@ ERepository::update_news() const
Lock l(_imp->mutexes->news_ptr_mutex);
if (! _imp->news_ptr)
- _imp->news_ptr.reset(new ERepositoryNews(_imp->params.environment, this, _imp->params));
+ _imp->news_ptr.reset(new ERepositoryNews(_imp->params.environment(), this, _imp->params));
_imp->news_ptr->update_news();
}
@@ -909,10 +909,10 @@ ERepository::set_profile(const ProfilesConstIterator & iter)
<< "Using profile '" << ((*iter).path()) << "'";
_imp->profile_ptr = (*iter).profile();
- if ((*DistributionData::get_instance()->distribution_from_string(_imp->params.environment->distribution()))
+ if ((*DistributionData::get_instance()->distribution_from_string(_imp->params.environment()->distribution()))
.support_old_style_virtuals())
- if (_imp->params.environment->package_database()->has_repository_named(RepositoryName("virtuals")))
- _imp->params.environment->package_database()->fetch_repository(
+ if (_imp->params.environment()->package_database()->has_repository_named(RepositoryName("virtuals")))
+ _imp->params.environment()->package_database()->fetch_repository(
RepositoryName("virtuals"))->invalidate();
invalidate_masks();
@@ -1072,7 +1072,7 @@ ERepository::check_qa(
}
}
- (*libqahandle.qa_checks_handle)(_imp->params.environment, shared_from_this(), ignore_if, ignore_unless,
+ (*libqahandle.qa_checks_handle)(_imp->params.environment(), shared_from_this(), ignore_if, ignore_unless,
minimum_level, reporter, dir);
#endif
}
@@ -1202,7 +1202,7 @@ ERepository::make_manifest(const QualifiedPackageName & qpn)
continue;
done_files.insert(*d);
- FSEntry f(params().distdir / *d);
+ FSEntry f(params().distdir() / *d);
std::ifstream file_stream(stringify(f).c_str());
if (! file_stream)
@@ -1231,14 +1231,14 @@ ERepository::make_manifest(const QualifiedPackageName & qpn)
std::string
ERepository::accept_keywords_variable() const
{
- return EAPIData::get_instance()->eapi_from_string(params().profile_eapi)->supported()
+ return EAPIData::get_instance()->eapi_from_string(params().profile_eapi())->supported()
->ebuild_environment_variables()->env_accept_keywords();
}
std::string
ERepository::arch_variable() const
{
- return EAPIData::get_instance()->eapi_from_string(params().profile_eapi)->supported()
+ return EAPIData::get_instance()->eapi_from_string(params().profile_eapi())->supported()
->ebuild_environment_variables()->env_arch();
}
@@ -1370,8 +1370,8 @@ ERepository::repository_factory_create(
if (profiles->empty())
{
if (master_repositories)
- std::copy((*master_repositories->begin())->params().profiles->begin(),
- (*master_repositories->begin())->params().profiles->end(), profiles->back_inserter());
+ std::copy((*master_repositories->begin())->params().profiles()->begin(),
+ (*master_repositories->begin())->params().profiles()->end(), profiles->back_inserter());
else if (FSEntry(location).is_directory_or_symlink_to_directory() &&
(DirIterator(FSEntry(location)) != DirIterator()))
{
@@ -1389,7 +1389,7 @@ ERepository::repository_factory_create(
{
for (ERepositorySequence::ConstIterator e(master_repositories->begin()),
e_end(master_repositories->end()) ; e != e_end ; ++e)
- std::copy((*e)->params().eclassdirs->begin(), (*e)->params().eclassdirs->end(), eclassdirs->back_inserter());
+ std::copy((*e)->params().eclassdirs()->begin(), (*e)->params().eclassdirs()->end(), eclassdirs->back_inserter());
}
eclassdirs->push_back(location + "/eclass");
}
@@ -1398,7 +1398,7 @@ ERepository::repository_factory_create(
if (distdir.empty())
{
if (master_repositories)
- distdir = stringify((*master_repositories->begin())->params().distdir);
+ distdir = stringify((*master_repositories->begin())->params().distdir());
else
{
distdir = EExtraDistributionData::get_instance()->data_from_distribution(
@@ -1515,7 +1515,7 @@ ERepository::repository_factory_create(
if (builddir.empty())
{
if (master_repositories)
- builddir = stringify((*master_repositories->begin())->params().builddir);
+ builddir = stringify((*master_repositories->begin())->params().builddir());
else
builddir = EExtraDistributionData::get_instance()->data_from_distribution(
*DistributionData::get_instance()->distribution_from_string(
@@ -1562,35 +1562,36 @@ ERepository::repository_factory_create(
throw ERepositoryConfigurationError("binary_destination = true, but binary_keywords is unset or empty");
}
- return std::tr1::shared_ptr<ERepository>(new ERepository(ERepositoryParams::create()
- .entry_format("ebuild")
- .layout(layout)
- .environment(env)
- .location(FSEntry(location).realpath_if_exists())
- .profiles(profiles)
- .cache(cache)
- .write_cache(FSEntry(write_cache).realpath_if_exists())
- .names_cache(FSEntry(names_cache).realpath_if_exists())
- .eclassdirs(eclassdirs)
- .distdir(FSEntry(distdir).realpath_if_exists())
- .securitydir(FSEntry(securitydir).realpath_if_exists())
- .setsdir(FSEntry(setsdir).realpath_if_exists())
- .newsdir(FSEntry(newsdir).realpath_if_exists())
- .sync(sync)
- .sync_options(sync_options)
- .master_repositories(master_repositories)
- .write_bin_uri_prefix("")
- .eapi_when_unknown(eapi_when_unknown)
- .eapi_when_unspecified(eapi_when_unspecified)
- .profile_eapi(profile_eapi)
- .use_manifest(use_manifest)
- .append_repository_name_to_write_cache(append_repository_name_to_write_cache)
- .ignore_deprecated_profiles(ignore_deprecated_profiles)
- .binary_destination(binary_destination)
- .binary_uri_prefix(binary_uri_prefix)
- .binary_distdir(binary_distdir)
- .binary_keywords(binary_keywords)
- .builddir(FSEntry(builddir).realpath_if_exists())));
+ 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::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>(profile_eapi),
+ value_for<n::profiles>(profiles),
+ 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())
+ )));
}
std::tr1::shared_ptr<const RepositoryNameSet>
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index f587a42..2151fb8 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -77,7 +77,7 @@ namespace paludis
/**
* Constructor.
*/
- ERepository(const ERepositoryParams &);
+ ERepository(const erepository::ERepositoryParams &);
/**
* Destructor.
@@ -174,7 +174,7 @@ namespace paludis
virtual std::string accept_keywords_variable() const;
virtual std::string arch_variable() const;
- const ERepositoryParams & params() const;
+ const erepository::ERepositoryParams & params() const;
///\}
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 19e877d..6615679 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -762,11 +762,11 @@ namespace test_cases
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
- repo->set_profile(repo->find_profile(repo->params().location / "profiles/profile/subprofile"));
+ repo->set_profile(repo->find_profile(repo->params().location() / "profiles/profile/subprofile"));
TEST_CHECK(! (*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
- repo->set_profile(repo->find_profile(repo->params().location / "profiles/profile"));
+ repo->set_profile(repo->find_profile(repo->params().location() / "profiles/profile"));
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/was_masked-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin())->masked());
@@ -814,7 +814,7 @@ namespace test_cases
TEST_CHECK(has_two);
TEST_CHECK_EQUAL(count, 2);
- repo->set_profile(repo->find_profile(repo->params().location / "profiles/profile/subprofile"));
+ repo->set_profile(repo->find_profile(repo->params().location() / "profiles/profile/subprofile"));
has_one = has_two = false;
count = 0;
diff --git a/paludis/repositories/e/e_repository_news.cc b/paludis/repositories/e/e_repository_news.cc
index 06ee2b0..7ae0435 100644
--- a/paludis/repositories/e/e_repository_news.cc
+++ b/paludis/repositories/e/e_repository_news.cc
@@ -60,13 +60,13 @@ namespace paludis
{
const Environment * const environment;
const ERepository * const e_repository;
- const ERepositoryParams params;
+ const erepository::ERepositoryParams params;
const FSEntry skip_file;
const FSEntry unread_file;
Implementation(const Environment * const e, const ERepository * const p,
- const ERepositoryParams & k) :
+ const erepository::ERepositoryParams & k) :
environment(e),
e_repository(p),
params(k),
@@ -80,7 +80,7 @@ namespace paludis
}
ERepositoryNews::ERepositoryNews(const Environment * const e, const ERepository * const p,
- const ERepositoryParams & k) :
+ const erepository::ERepositoryParams & k) :
PrivateImplementationPattern<ERepositoryNews>(new Implementation<ERepositoryNews>(e, p, k))
{
}
@@ -93,10 +93,10 @@ void
ERepositoryNews::update_news() const
{
Context context("When updating news at location '" +
- stringify(_imp->params.newsdir) + "' for repository '" +
+ stringify(_imp->params.newsdir()) + "' for repository '" +
stringify(_imp->e_repository->name()) + "':");
- if (! _imp->params.newsdir.is_directory_or_symlink_to_directory())
+ if (! _imp->params.newsdir().is_directory_or_symlink_to_directory())
return;
std::set<std::string> skip;
@@ -109,7 +109,7 @@ ERepositoryNews::update_news() const
std::copy(s.begin(), s.end(), std::inserter(skip, skip.end()));
}
- for (DirIterator d(_imp->params.newsdir), d_end ; d != d_end ; ++d)
+ for (DirIterator d(_imp->params.newsdir()), d_end ; d != d_end ; ++d)
{
Context local_context("When handling news entry '" + stringify(*d) + "':");
@@ -142,7 +142,7 @@ ERepositoryNews::update_news() const
if (! (*_imp->environment)[selection::SomeArbitraryVersion(
generator::Matches(PackageDepSpec(parse_elike_package_dep_spec(*i,
erepository::EAPIData::get_instance()->eapi_from_string(
- _imp->e_repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(),
+ _imp->e_repository->params().profile_eapi())->supported()->package_dep_spec_parse_options(),
std::tr1::shared_ptr<const PackageID>())), MatchPackageOptions()) |
filter::SupportsAction<InstalledAction>())]->empty())
local_show = true;
@@ -162,7 +162,7 @@ ERepositoryNews::update_news() const
if (news.begin_display_if_profile() != news.end_display_if_profile())
{
bool local_show(false);
- std::tr1::shared_ptr<const FSEntrySequence> c(_imp->params.profiles);
+ std::tr1::shared_ptr<const FSEntrySequence> c(_imp->params.profiles());
for (FSEntrySequence::ConstIterator p(c->begin()), p_end(c->end()) ; p != p_end ; ++p)
{
std::string profile(strip_leading_string(strip_trailing_string(
diff --git a/paludis/repositories/e/e_repository_news.hh b/paludis/repositories/e/e_repository_news.hh
index 2c212a0..73994c3 100644
--- a/paludis/repositories/e/e_repository_news.hh
+++ b/paludis/repositories/e/e_repository_news.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008 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,7 +52,7 @@ namespace paludis
///\{
ERepositoryNews(const Environment * const, const ERepository * const,
- const ERepositoryParams &);
+ const erepository::ERepositoryParams &);
~ERepositoryNews();
///\}
diff --git a/paludis/repositories/e/e_repository_params.cc b/paludis/repositories/e/e_repository_params.cc
index ec1dd47..026eae5 100644
--- a/paludis/repositories/e/e_repository_params.cc
+++ b/paludis/repositories/e/e_repository_params.cc
@@ -30,7 +30,6 @@ using namespace paludis;
using namespace paludis::erepository;
#include <paludis/repositories/e/e_repository_params-se.cc>
-#include <paludis/repositories/e/e_repository_params-sr.cc>
template class Sequence<std::tr1::shared_ptr<const ERepository> >;
template class WrappedForwardIterator<Sequence<std::tr1::shared_ptr<const ERepository> >::ConstIteratorTag, const std::tr1::shared_ptr<const ERepository> >;
diff --git a/paludis/repositories/e/e_repository_params.hh b/paludis/repositories/e/e_repository_params.hh
index 982f0da..c267bbf 100644
--- a/paludis/repositories/e/e_repository_params.hh
+++ b/paludis/repositories/e/e_repository_params.hh
@@ -21,7 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_E_REPOSITORY_PARAMS_HH 1
#include <paludis/util/fs_entry.hh>
-#include <paludis/util/sr.hh>
+#include <paludis/util/named_value.hh>
/** \file
* Declaration for the ERepositoryParams class.
@@ -37,12 +37,74 @@ namespace paludis
typedef Sequence<std::tr1::shared_ptr<const ERepository> > ERepositorySequence;
+ namespace n
+ {
+ struct append_repository_name_to_write_cache;
+ 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;
+ struct profiles;
+ struct securitydir;
+ struct setsdir;
+ struct sync;
+ struct sync_options;
+ struct use_manifest;
+ struct write_bin_uri_prefix;
+ struct write_cache;
+ }
+
namespace erepository
{
#include <paludis/repositories/e/e_repository_params-se.hh>
- }
-#include <paludis/repositories/e/e_repository_params-sr.hh>
+ struct ERepositoryParams
+ {
+ NamedValue<n::append_repository_name_to_write_cache, bool> append_repository_name_to_write_cache;
+ NamedValue<n::binary_destination, bool> binary_destination;
+ NamedValue<n::binary_distdir, FSEntry> binary_distdir;
+ NamedValue<n::binary_keywords, std::string> binary_keywords;
+ NamedValue<n::binary_uri_prefix, std::string> binary_uri_prefix;
+ NamedValue<n::builddir, FSEntry> builddir;
+ NamedValue<n::cache, FSEntry> cache;
+ NamedValue<n::distdir, FSEntry> distdir;
+ NamedValue<n::eapi_when_unknown, std::string> eapi_when_unknown;
+ NamedValue<n::eapi_when_unspecified, std::string> eapi_when_unspecified;
+ NamedValue<n::eclassdirs, std::tr1::shared_ptr<const FSEntrySequence> > eclassdirs;
+ NamedValue<n::entry_format, std::string> entry_format;
+ NamedValue<n::environment, Environment *> environment;
+ NamedValue<n::ignore_deprecated_profiles, bool> ignore_deprecated_profiles;
+ NamedValue<n::layout, std::string> layout;
+ NamedValue<n::location, FSEntry> location;
+ NamedValue<n::master_repositories, std::tr1::shared_ptr<const ERepositorySequence> > master_repositories;
+ NamedValue<n::names_cache, FSEntry> names_cache;
+ NamedValue<n::newsdir, FSEntry> newsdir;
+ NamedValue<n::profile_eapi, std::string> profile_eapi;
+ NamedValue<n::profiles, std::tr1::shared_ptr<const FSEntrySequence> > profiles;
+ NamedValue<n::securitydir, FSEntry> securitydir;
+ NamedValue<n::setsdir, FSEntry> setsdir;
+ NamedValue<n::sync, std::string> sync;
+ NamedValue<n::sync_options, std::string> sync_options;
+ NamedValue<n::use_manifest, erepository::UseManifest> use_manifest;
+ NamedValue<n::write_bin_uri_prefix, std::string> write_bin_uri_prefix;
+ NamedValue<n::write_cache, FSEntry> write_cache;
+ };
+ }
}
diff --git a/paludis/repositories/e/e_repository_params.sr b/paludis/repositories/e/e_repository_params.sr
deleted file mode 100644
index 77a1203..0000000
--- a/paludis/repositories/e/e_repository_params.sr
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-make_class_ERepositoryParams()
-{
- visible
-
- key entry_format std::string
- key layout std::string
- key environment "Environment *"
- key location FSEntry
- key profiles "std::tr1::shared_ptr<const FSEntrySequence>"
- key cache FSEntry
- key write_cache FSEntry
- key append_repository_name_to_write_cache bool
- key names_cache FSEntry
- key distdir FSEntry
- key eclassdirs "std::tr1::shared_ptr<const FSEntrySequence>"
- key setsdir FSEntry
- key securitydir FSEntry
- key newsdir FSEntry
- key sync std::string
- key sync_options std::string
- key builddir FSEntry
- key master_repositories "std::tr1::shared_ptr<const ERepositorySequence>"
- key write_bin_uri_prefix std::string
- key eapi_when_unknown std::string
- key eapi_when_unspecified std::string
- key profile_eapi std::string
- key use_manifest "erepository::UseManifest"
- key ignore_deprecated_profiles bool
-
- key binary_destination bool
- key binary_uri_prefix std::string
- key binary_distdir FSEntry
- key binary_keywords std::string
-
- doxygen_comment << "END"
- /**
- * Parameters used to create a ERepository
- *
- * \see ERepository
- * \ingroup grperepository
- * \nosubgrouping
- */
-END
-
- allow_named_args
-}
-
diff --git a/paludis/repositories/e/e_repository_profile.cc b/paludis/repositories/e/e_repository_profile.cc
index a3f3964..674f9d2 100644
--- a/paludis/repositories/e/e_repository_profile.cc
+++ b/paludis/repositories/e/e_repository_profile.cc
@@ -198,7 +198,7 @@ namespace paludis
{
Context subcontext("When using directory '" + stringify(*d) + "':");
- if (! p->params().ignore_deprecated_profiles)
+ if (! p->params().ignore_deprecated_profiles())
if ((*d / "deprecated").is_regular_file_or_symlink_to_regular_file())
Log::get_instance()->message("e.profile.deprecated", ll_warning, lc_context) << "Profile directory '" << *d
<< "' is deprecated. See the file '" << (*d / "deprecated") << "' for details";
@@ -345,7 +345,7 @@ Implementation<ERepositoryProfile>::load_profile_make_defaults(const FSEntry & d
}
std::string use_expand_var(erepository::EAPIData::get_instance()->eapi_from_string(
- repository->params().profile_eapi)->supported()->ebuild_environment_variables()->env_use_expand());
+ repository->params().profile_eapi())->supported()->ebuild_environment_variables()->env_use_expand());
try
{
use_expand->clear();
@@ -367,7 +367,7 @@ void
Implementation<ERepositoryProfile>::load_special_make_defaults_vars()
{
std::string use_var(erepository::EAPIData::get_instance()->eapi_from_string(
- repository->params().profile_eapi)->supported()->ebuild_environment_variables()->env_use());
+ repository->params().profile_eapi())->supported()->ebuild_environment_variables()->env_use());
try
{
use.clear();
@@ -391,7 +391,7 @@ Implementation<ERepositoryProfile>::load_special_make_defaults_vars()
}
std::string use_expand_var(erepository::EAPIData::get_instance()->eapi_from_string(
- repository->params().profile_eapi)->supported()->ebuild_environment_variables()->env_use_expand());
+ repository->params().profile_eapi())->supported()->ebuild_environment_variables()->env_use_expand());
try
{
use_expand->clear();
@@ -409,7 +409,7 @@ Implementation<ERepositoryProfile>::load_special_make_defaults_vars()
}
std::string use_expand_hidden_var(erepository::EAPIData::get_instance()->eapi_from_string(
- repository->params().profile_eapi)->supported()->ebuild_environment_variables()->env_use_expand_hidden());
+ repository->params().profile_eapi())->supported()->ebuild_environment_variables()->env_use_expand_hidden());
try
{
use_expand_hidden->clear();
@@ -431,7 +431,7 @@ Implementation<ERepositoryProfile>::load_special_make_defaults_vars()
bool
Implementation<ERepositoryProfile>::is_incremental(const std::string & s) const
{
- std::tr1::shared_ptr<const erepository::EAPI> e(erepository::EAPIData::get_instance()->eapi_from_string(repository->params().profile_eapi));
+ std::tr1::shared_ptr<const erepository::EAPI> e(erepository::EAPIData::get_instance()->eapi_from_string(repository->params().profile_eapi()));
Context c("When checking whether '" + s + "' is incremental:");
@@ -449,7 +449,7 @@ Implementation<ERepositoryProfile>::make_vars_from_file_vars()
{
try
{
- if (! repository->params().master_repositories)
+ if (! repository->params().master_repositories())
for (erepository::ProfileFile<LineConfigFile>::ConstIterator i(packages_file.begin()),
i_end(packages_file.end()) ; i != i_end ; ++i)
{
@@ -460,7 +460,7 @@ Implementation<ERepositoryProfile>::make_vars_from_file_vars()
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
parse_elike_package_dep_spec(i->substr(1),
erepository::EAPIData::get_instance()->eapi_from_string(
- repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(),
+ repository->params().profile_eapi())->supported()->package_dep_spec_parse_options(),
std::tr1::shared_ptr<const PackageID>())));
spec->set_tag(system_tag);
@@ -493,7 +493,7 @@ Implementation<ERepositoryProfile>::make_vars_from_file_vars()
virtuals.erase(v);
virtuals.insert(std::make_pair(v, std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
parse_elike_package_dep_spec(tokens[1], erepository::EAPIData::get_instance()->eapi_from_string(
- repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(),
+ repository->params().profile_eapi())->supported()->package_dep_spec_parse_options(),
std::tr1::shared_ptr<const PackageID>())))));
}
}
@@ -517,7 +517,7 @@ Implementation<ERepositoryProfile>::make_vars_from_file_vars()
{
std::tr1::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(
parse_elike_package_dep_spec(line->first, erepository::EAPIData::get_instance()->eapi_from_string(
- repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(),
+ repository->params().profile_eapi())->supported()->package_dep_spec_parse_options(),
std::tr1::shared_ptr<const PackageID>())));
if (a->package_ptr())
@@ -600,7 +600,7 @@ Implementation<ERepositoryProfile>::load_spec_use_file(const FSEntry & file, Pac
{
std::tr1::shared_ptr<const PackageDepSpec> spec(new PackageDepSpec(
parse_elike_package_dep_spec(*tokens.begin(), erepository::EAPIData::get_instance()->eapi_from_string(
- repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(),
+ repository->params().profile_eapi())->supported()->package_dep_spec_parse_options(),
std::tr1::shared_ptr<const PackageID>())));
PackageFlagStatusMapList::iterator n(m.insert(m.end(), std::make_pair(spec, FlagStatusMap())));
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 3ec730c..a22c434 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -72,10 +72,10 @@ namespace paludis
{
const Environment * const environment;
const ERepository * const e_repository;
- const ERepositoryParams params;
+ const erepository::ERepositoryParams params;
Implementation(const Environment * const e, const ERepository * const p,
- const ERepositoryParams & k) :
+ const erepository::ERepositoryParams & k) :
environment(e),
e_repository(p),
params(k)
@@ -85,7 +85,7 @@ namespace paludis
}
ERepositorySets::ERepositorySets(const Environment * const e, const ERepository * const p,
- const ERepositoryParams & k) :
+ const erepository::ERepositoryParams & k) :
PrivateImplementationPattern<ERepositorySets>(new Implementation<ERepositorySets>(e, p, k))
{
}
@@ -108,11 +108,11 @@ ERepositorySets::package_set(const SetName & ss) const
std::pair<SetName, SetFileSetOperatorMode> s(find_base_set_name_and_suffix_mode(ss));
- if ((_imp->params.setsdir / (stringify(s.first) + ".conf")).exists())
+ if ((_imp->params.setsdir() / (stringify(s.first) + ".conf")).exists())
{
std::tr1::shared_ptr<GeneralSetDepTag> tag(new GeneralSetDepTag(ss, stringify(_imp->e_repository->name())));
- FSEntry ff(_imp->params.setsdir / (stringify(s.first) + ".conf"));
+ FSEntry ff(_imp->params.setsdir() / (stringify(s.first) + ".conf"));
Context context("When loading package set '" + stringify(s.first) + "' from '" + stringify(ff) + "':");
SetFile f(SetFileParams::create()
@@ -146,7 +146,7 @@ ERepositorySets::sets_list() const
std::list<FSEntry> repo_sets;
std::remove_copy_if(
- DirIterator(_imp->params.setsdir),
+ DirIterator(_imp->params.setsdir()),
DirIterator(),
std::back_inserter(repo_sets),
std::tr1::bind(std::logical_not<bool>(), std::tr1::bind(is_file_with_extension, _1, ".conf", IsFileWithOptions())));
@@ -256,12 +256,12 @@ ERepositorySets::security_set(bool insecurity) const
std::tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > security_packages(
new ConstTreeSequence<SetSpecTree, AllDepSpec>(std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
- if (!_imp->params.securitydir.is_directory_or_symlink_to_directory())
+ if (!_imp->params.securitydir().is_directory_or_symlink_to_directory())
return security_packages;
std::map<std::string, std::tr1::shared_ptr<GLSADepTag> > glsa_tags;
- for (DirIterator f(_imp->params.securitydir), f_end ; f != f_end; ++f)
+ for (DirIterator f(_imp->params.securitydir()), f_end ; f != f_end; ++f)
{
if (! is_file_with_prefix_extension(*f, "glsa-", ".xml", IsFileWithOptions()))
continue;
diff --git a/paludis/repositories/e/e_repository_sets.hh b/paludis/repositories/e/e_repository_sets.hh
index 07210f7..2cafa68 100644
--- a/paludis/repositories/e/e_repository_sets.hh
+++ b/paludis/repositories/e/e_repository_sets.hh
@@ -50,7 +50,7 @@ namespace paludis
///\{
ERepositorySets(const Environment * const env, const ERepository * const,
- const ERepositoryParams &);
+ const erepository::ERepositoryParams &);
~ERepositorySets();
///\}
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 588c37f..e6c1075 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -413,7 +413,7 @@ EbuildMetadataCommand::load(const std::tr1::shared_ptr<const EbuildID> & id)
if (! ((s = get(keys, id->eapi()->supported()->ebuild_metadata_variables()->eapi().name()))).empty())
id->set_eapi(s);
else
- id->set_eapi(id->e_repository()->params().eapi_when_unspecified);
+ id->set_eapi(id->e_repository()->params().eapi_when_unspecified());
if (! id->eapi()->supported())
{
@@ -1046,8 +1046,8 @@ WriteBinaryEbuildCommand::operator() ()
params.package_id()->eapi()->supported()->ebuild_options()->ignore_pivot_env_functions())
.with_setenv("PALUDIS_IGNORE_PIVOT_ENV_VARIABLES",
params.package_id()->eapi()->supported()->ebuild_options()->ignore_pivot_env_variables())
- .with_setenv("PALUDIS_BINARY_URI_PREFIX", params.destination_repository()->params().binary_uri_prefix)
- .with_setenv("PALUDIS_BINARY_KEYWORDS", params.destination_repository()->params().binary_keywords)
+ .with_setenv("PALUDIS_BINARY_URI_PREFIX", params.destination_repository()->params().binary_uri_prefix())
+ .with_setenv("PALUDIS_BINARY_KEYWORDS", params.destination_repository()->params().binary_keywords())
.with_setenv("PALUDIS_BINARY_KEYWORDS_VARIABLE", EAPIData::get_instance()->eapi_from_string("pbin-1+"
+ params.package_id()->eapi()->exported_name())->supported()->ebuild_metadata_variables()->keywords().name())
.with_setenv("PALUDIS_BINARY_DISTDIR_VARIABLE", EAPIData::get_instance()->eapi_from_string("pbin-1+"
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 82cc50b..79d92fa 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -127,10 +127,10 @@ namespace paludis
environment(e),
e_repository(p),
params(k),
- eclass_mtimes(new EclassMtimes(p, k.eclassdirs)),
+ eclass_mtimes(new EclassMtimes(p, k.eclassdirs())),
master_mtime(0)
{
- FSEntry m(k.location / "metadata" / "timestamp");
+ FSEntry m(k.location() / "metadata" / "timestamp");
if (m.exists())
master_mtime = m.mtime();
}
@@ -152,7 +152,7 @@ EbuildEntries::make_id(const QualifiedPackageName & q, const FSEntry & f) const
{
Context context("When creating ID for '" + stringify(q) + "' from '" + stringify(f) + "':");
- std::tr1::shared_ptr<EbuildID> result(new EbuildID(q, extract_package_file_version(q, f), _imp->params.environment,
+ std::tr1::shared_ptr<EbuildID> result(new EbuildID(q, extract_package_file_version(q, f), _imp->params.environment(),
_imp->e_repository->shared_from_this(), f, _guess_eapi(q, f),
_imp->master_mtime, _imp->eclass_mtimes));
return result;
@@ -361,7 +361,7 @@ EbuildEntries::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id,
bool fetch_restrict(false), userpriv_restrict(false);
{
- DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment);
+ DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment());
if (id->restrict_key())
id->restrict_key()->value()->accept(restricts);
@@ -378,14 +378,14 @@ EbuildEntries::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id,
}
bool fetch_userpriv_ok(_imp->environment->reduced_gid() != getgid() &&
- check_userpriv(FSEntry(_imp->params.distdir), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
+ check_userpriv(FSEntry(_imp->params.distdir()), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
std::string archives, all_archives;
{
std::set<std::string> already_in_archives;
/* make A */
- AFinder f(_imp->params.environment, id);
+ AFinder f(_imp->params.environment(), id);
if (id->fetches_key())
id->fetches_key()->value()->accept(f);
@@ -435,28 +435,28 @@ EbuildEntries::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id,
/* always use mirror://gentoo/, where gentoo is the name of our first master repository,
* or our name if there's no master. */
std::string mirrors_name(
- (_imp->e_repository->params().master_repositories && ! _imp->e_repository->params().master_repositories->empty()) ?
- stringify((*_imp->e_repository->params().master_repositories->begin())->name()) :
+ (_imp->e_repository->params().master_repositories() && ! _imp->e_repository->params().master_repositories()->empty()) ?
+ stringify((*_imp->e_repository->params().master_repositories()->begin())->name()) :
stringify(_imp->e_repository->name()));
- FetchVisitor f(_imp->params.environment, id, *id->eapi(),
- _imp->e_repository->params().distdir, o.fetch_unneeded(), fetch_userpriv_ok, mirrors_name,
+ FetchVisitor f(_imp->params.environment(), id, *id->eapi(),
+ _imp->e_repository->params().distdir(), o.fetch_unneeded(), fetch_userpriv_ok, mirrors_name,
id->fetches_key()->initial_label(), o.safe_resume(), o.maybe_output_deviant());
id->fetches_key()->value()->accept(f);
- CheckFetchedFilesVisitor c(_imp->environment, id, _imp->e_repository->params().distdir,
+ CheckFetchedFilesVisitor c(_imp->environment, id, _imp->e_repository->params().distdir(),
o.fetch_unneeded(), fetch_restrict,
((_imp->e_repository->layout()->package_directory(id->name())) / "Manifest"),
- _imp->e_repository->params().use_manifest,
+ _imp->e_repository->params().use_manifest(),
o.maybe_output_deviant(), o.exclude_unmirrorable());
id->fetches_key()->value()->accept(c);
if (c.need_nofetch())
{
bool userpriv_ok((! userpriv_restrict) && (_imp->environment->reduced_gid() != getgid()) &&
- check_userpriv(FSEntry(_imp->params.builddir), _imp->environment,
+ check_userpriv(FSEntry(_imp->params.builddir()), _imp->environment,
id->eapi()->supported()->userpriv_cannot_use_root()));
- std::string use(make_use(_imp->params.environment, *id, p));
+ std::string use(make_use(_imp->params.environment(), *id, p));
std::tr1::shared_ptr<Map<std::string, std::string> > expand_vars(make_expand(
- _imp->params.environment, *id, p));
+ _imp->params.environment(), *id, p));
std::tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
@@ -465,19 +465,19 @@ EbuildEntries::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::builddir>(_imp->params.builddir()),
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
- value_for<n::distdir>(_imp->params.distdir),
+ value_for<n::distdir>(_imp->params.distdir()),
value_for<n::ebuild_dir>(_imp->e_repository->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::eclassdirs>(_imp->params.eclassdirs()),
+ value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
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),
+ (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
+ (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()),
value_for<n::sandbox>(phase->option("sandbox")),
value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok)
));
@@ -488,7 +488,7 @@ EbuildEntries::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::aa>(all_archives),
value_for<n::expand_vars>(expand_vars),
value_for<n::maybe_output_deviant>(o.maybe_output_deviant()),
- value_for<n::profiles>(_imp->params.profiles),
+ value_for<n::profiles>(_imp->params.profiles()),
value_for<n::root>("/"),
value_for<n::use>(use),
value_for<n::use_expand>(join(p->use_expand()->begin(), p->use_expand()->end(), " ")),
@@ -515,8 +515,8 @@ EbuildEntries::pretend_fetch(const std::tr1::shared_ptr<const ERepositoryID> & i
if (id->fetches_key())
{
- PretendFetchVisitor f(_imp->params.environment, id, *id->eapi(),
- _imp->e_repository->params().distdir, a.options.fetch_unneeded(),
+ PretendFetchVisitor f(_imp->params.environment(), id, *id->eapi(),
+ _imp->e_repository->params().distdir(), a.options.fetch_unneeded(),
id->fetches_key()->initial_label(), a);
id->fetches_key()->value()->accept(f);
}
@@ -532,7 +532,7 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
bool userpriv_restrict, test_restrict, strip_restrict;
{
- DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment);
+ DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment());
if (id->restrict_key())
id->restrict_key()->value()->accept(restricts);
@@ -558,7 +558,7 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
std::set<std::string> already_in_archives;
/* make A */
- AFinder f(_imp->params.environment, id);
+ AFinder f(_imp->params.environment(), id);
if (id->fetches_key())
id->fetches_key()->value()->accept(f);
@@ -604,18 +604,18 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
all_archives = strip_trailing(all_archives, " ");
/* make use */
- std::string use(make_use(_imp->params.environment, *id, p));
+ std::string use(make_use(_imp->params.environment(), *id, p));
/* add expand to use (iuse isn't reliable for use_expand things), and make the expand
* environment variables */
std::tr1::shared_ptr<Map<std::string, std::string> > expand_vars(make_expand(
- _imp->params.environment, *id, p));
+ _imp->params.environment(), *id, p));
std::tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
bool userpriv_ok((! userpriv_restrict) && (_imp->environment->reduced_gid() != getgid()) &&
- check_userpriv(FSEntry(_imp->params.distdir), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()) &&
- check_userpriv(FSEntry(_imp->params.builddir), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
+ check_userpriv(FSEntry(_imp->params.distdir()), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()) &&
+ check_userpriv(FSEntry(_imp->params.builddir()), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
EAPIPhases phases(id->eapi()->supported()->ebuild_phases()->ebuild_install());
for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
@@ -630,9 +630,9 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
(*o.destination()).destination_interface()->merge(
make_named_values<MergeParams>(
- value_for<n::environment_file>(_imp->params.builddir / (stringify(id->name().category) + "-" +
+ value_for<n::environment_file>(_imp->params.builddir() / (stringify(id->name().category) + "-" +
stringify(id->name().package) + "-" + stringify(id->version())) / "temp" / "loadsaveenv"),
- value_for<n::image_dir>(_imp->params.builddir / (stringify(id->name().category) + "-" +
+ value_for<n::image_dir>(_imp->params.builddir() / (stringify(id->name().category) + "-" +
stringify(id->name().package) + "-" + stringify(id->version())) / "image"),
value_for<n::options>(id->eapi()->supported()->merger_options()),
value_for<n::package_id>(id),
@@ -661,9 +661,9 @@ EbuildEntries::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>(_imp->params.builddir / (stringify(id->name().category) + "-" +
+ value_for<n::debug_dir>(_imp->params.builddir() / (stringify(id->name().category) + "-" +
stringify(id->name().package) + "-" + stringify(id->version())) / "image" / "usr" / libdir / "debug"),
- value_for<n::image_dir>(_imp->params.builddir / (stringify(id->name().category) + "-" +
+ value_for<n::image_dir>(_imp->params.builddir() / (stringify(id->name().category) + "-" +
stringify(id->name().package) + "-" + stringify(id->version())) / "image"),
value_for<n::package_id>(id),
value_for<n::split>(split_choice && split_choice->enabled()),
@@ -698,19 +698,19 @@ EbuildEntries::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::builddir>(_imp->params.builddir()),
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
- value_for<n::distdir>(_imp->params.distdir),
+ value_for<n::distdir>(_imp->params.distdir()),
value_for<n::ebuild_dir>(_imp->e_repository->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::eclassdirs>(_imp->params.eclassdirs()),
+ value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
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),
+ (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
+ (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()),
value_for<n::sandbox>(phase->option("sandbox")),
value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok)
));
@@ -722,8 +722,8 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::config_protect>(_imp->e_repository->profile_variable("CONFIG_PROTECT")),
value_for<n::config_protect_mask>(_imp->e_repository->profile_variable("CONFIG_PROTECT_MASK")),
value_for<n::expand_vars>(expand_vars),
- value_for<n::loadsaveenv_dir>(_imp->params.builddir / (stringify(id->name().category) + "-" + stringify(id->name().package) + "-" + stringify(id->version())) / "temp"),
- value_for<n::profiles>(_imp->params.profiles),
+ value_for<n::loadsaveenv_dir>(_imp->params.builddir() / (stringify(id->name().category) + "-" + stringify(id->name().package) + "-" + stringify(id->version())) / "temp"),
+ value_for<n::profiles>(_imp->params.profiles()),
value_for<n::root>(o.destination()->installed_root_key() ? stringify(o.destination()->installed_root_key()->value()) : "/"),
value_for<n::slot>(SlotName(id->slot())),
value_for<n::use>(use),
@@ -747,7 +747,7 @@ EbuildEntries::info(const std::tr1::shared_ptr<const ERepositoryID> & id,
bool userpriv_restrict;
{
- DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment);
+ DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment());
if (id->restrict_key())
id->restrict_key()->value()->accept(restricts);
@@ -758,15 +758,15 @@ EbuildEntries::info(const std::tr1::shared_ptr<const ERepositoryID> & id,
std::tr1::bind(std::equal_to<std::string>(), std::tr1::bind(std::tr1::mem_fn(&StringDepSpec::text), _1), "nouserpriv"));
}
bool userpriv_ok((! userpriv_restrict) && (_imp->environment->reduced_gid() != getgid()) &&
- check_userpriv(FSEntry(_imp->params.builddir), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
+ check_userpriv(FSEntry(_imp->params.builddir()), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
/* make use */
- std::string use(make_use(_imp->params.environment, *id, p));
+ std::string use(make_use(_imp->params.environment(), *id, p));
/* add expand to use (iuse isn't reliable for use_expand things), and make the expand
* environment variables */
std::tr1::shared_ptr<Map<std::string, std::string> > expand_vars(make_expand(
- _imp->params.environment, *id, p));
+ _imp->params.environment(), *id, p));
std::tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
@@ -778,19 +778,19 @@ EbuildEntries::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::builddir>(_imp->params.builddir()),
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
- value_for<n::distdir>(_imp->params.distdir),
+ value_for<n::distdir>(_imp->params.distdir()),
value_for<n::ebuild_dir>(_imp->e_repository->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::eclassdirs>(_imp->params.eclassdirs()),
+ value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
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),
+ (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
+ (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()),
value_for<n::sandbox>(phase->option("sandbox")),
value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok)
));
@@ -801,8 +801,8 @@ EbuildEntries::info(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::info_vars>(_imp->e_repository->info_vars_key() ?
_imp->e_repository->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::root>(stringify(_imp->params.environment->root())),
+ value_for<n::profiles>(_imp->params.profiles()),
+ value_for<n::root>(stringify(_imp->params.environment()->root())),
value_for<n::use>(use),
value_for<n::use_ebuild_file>(true),
value_for<n::use_expand>(join(p->use_expand()->begin(), p->use_expand()->end(), " ")),
@@ -829,7 +829,7 @@ EbuildEntries::get_environment_variable(const std::tr1::shared_ptr<const EReposi
{
using namespace std::tr1::placeholders;
- DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment);
+ DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment());
if (id->restrict_key())
id->restrict_key()->value()->accept(restricts);
@@ -840,24 +840,24 @@ EbuildEntries::get_environment_variable(const std::tr1::shared_ptr<const EReposi
std::tr1::bind(std::equal_to<std::string>(), std::tr1::bind(std::tr1::mem_fn(&StringDepSpec::text), _1), "nouserpriv"));
}
bool userpriv_ok((! userpriv_restrict) && (_imp->environment->reduced_gid() != getgid()) &&
- check_userpriv(FSEntry(_imp->params.builddir), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
+ check_userpriv(FSEntry(_imp->params.builddir()), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
std::tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
EbuildVariableCommand cmd(make_named_values<EbuildCommandParams>(
- value_for<n::builddir>(_imp->params.builddir),
+ value_for<n::builddir>(_imp->params.builddir()),
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::distdir>(_imp->params.distdir()),
value_for<n::ebuild_dir>(_imp->e_repository->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::eclassdirs>(_imp->params.eclassdirs()),
+ value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
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),
+ (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
+ (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()),
value_for<n::sandbox>(phases.begin_phases()->option("sandbox")),
value_for<n::userpriv>(phases.begin_phases()->option("userpriv") && userpriv_ok)
),
@@ -895,11 +895,11 @@ EbuildEntries::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_distdir>(_imp->params.binary_distdir()),
value_for<n::binary_ebuild_location>(binary_ebuild_location),
- value_for<n::builddir>(_imp->params.builddir),
+ value_for<n::builddir>(_imp->params.builddir()),
value_for<n::destination_repository>(_imp->e_repository),
- value_for<n::environment>(_imp->params.environment),
+ 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::merger_options>(std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id())->eapi()->supported()->merger_options()),
@@ -954,7 +954,7 @@ EbuildEntries::pretend(const std::tr1::shared_ptr<const ERepositoryID> & id,
bool userpriv_restrict;
{
- DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment);
+ DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(_imp->params.environment());
if (id->restrict_key())
id->restrict_key()->value()->accept(restricts);
@@ -965,11 +965,11 @@ EbuildEntries::pretend(const std::tr1::shared_ptr<const ERepositoryID> & id,
std::tr1::bind(std::equal_to<std::string>(), std::tr1::bind(std::tr1::mem_fn(&StringDepSpec::text), _1), "nouserpriv"));
}
bool userpriv_ok((! userpriv_restrict) && (_imp->environment->reduced_gid() != getgid()) &&
- check_userpriv(FSEntry(_imp->params.builddir), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
+ check_userpriv(FSEntry(_imp->params.builddir()), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
- std::string use(make_use(_imp->params.environment, *id, p));
+ std::string use(make_use(_imp->params.environment(), *id, p));
std::tr1::shared_ptr<Map<std::string, std::string> > expand_vars(make_expand(
- _imp->params.environment, *id, p));
+ _imp->params.environment(), *id, p));
std::tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
@@ -988,19 +988,19 @@ EbuildEntries::pretend(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::builddir>(_imp->params.builddir()),
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
- value_for<n::distdir>(_imp->params.distdir),
+ value_for<n::distdir>(_imp->params.distdir()),
value_for<n::ebuild_dir>(_imp->e_repository->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::eclassdirs>(_imp->params.eclassdirs()),
+ value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
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),
+ (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
+ (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()),
value_for<n::sandbox>(phase->option("sandbox")),
value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok)
));
@@ -1008,8 +1008,8 @@ EbuildEntries::pretend(const std::tr1::shared_ptr<const ERepositoryID> & id,
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::root>(stringify(_imp->params.environment->root())),
+ value_for<n::profiles>(_imp->params.profiles()),
+ value_for<n::root>(stringify(_imp->params.environment()->root())),
value_for<n::unmet_requirements>(verifier.unmet_requirements()),
value_for<n::use>(use),
value_for<n::use_expand>(join(p->use_expand()->begin(), p->use_expand()->end(), " ")),
@@ -1032,19 +1032,19 @@ EbuildEntries::pretend(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::builddir>(_imp->params.builddir()),
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
- value_for<n::distdir>(_imp->params.distdir),
+ value_for<n::distdir>(_imp->params.distdir()),
value_for<n::ebuild_dir>(_imp->e_repository->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::eclassdirs>(_imp->params.eclassdirs()),
+ value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
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),
+ (_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
+ (*_imp->params.master_repositories()->begin())->params().location() : _imp->params.location()),
value_for<n::sandbox>(phase->option("sandbox")),
value_for<n::userpriv>(phase->option("userpriv") && userpriv_ok)
));
@@ -1052,8 +1052,8 @@ EbuildEntries::pretend(const std::tr1::shared_ptr<const ERepositoryID> & id,
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::root>(stringify(_imp->params.environment->root())),
+ value_for<n::profiles>(_imp->params.profiles()),
+ value_for<n::root>(stringify(_imp->params.environment()->root())),
value_for<n::use>(use),
value_for<n::use_expand>(join(p->use_expand()->begin(), p->use_expand()->end(), " ")),
value_for<n::use_expand_hidden>(join(p->use_expand_hidden()->begin(), p->use_expand_hidden()->end(), " "))
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 5e90908..1022b2f 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -170,25 +170,25 @@ EbuildID::need_keys_added() const
Context context("When generating metadata for ID '" + canonical_form(idcf_full) + "':");
- FSEntry cache_file(_imp->repository->params().cache);
+ FSEntry cache_file(_imp->repository->params().cache());
cache_file /= stringify(name().category);
cache_file /= stringify(name().package) + "-" + stringify(version());
- FSEntry write_cache_file(_imp->repository->params().write_cache);
- if (_imp->repository->params().append_repository_name_to_write_cache)
+ FSEntry write_cache_file(_imp->repository->params().write_cache());
+ if (_imp->repository->params().append_repository_name_to_write_cache())
write_cache_file /= stringify(repository()->name());
write_cache_file /= stringify(name().category);
write_cache_file /= stringify(name().package) + "-" + stringify(version());
bool ok(false);
- if (_imp->repository->params().cache.basename() != "empty")
+ if (_imp->repository->params().cache().basename() != "empty")
{
EbuildFlatMetadataCache metadata_cache(_imp->environment, cache_file, _imp->ebuild, _imp->master_mtime, _imp->eclass_mtimes, false);
if (metadata_cache.load(shared_from_this()))
ok = true;
}
- if ((! ok) && _imp->repository->params().write_cache.basename() != "empty")
+ if ((! ok) && _imp->repository->params().write_cache().basename() != "empty")
{
EbuildFlatMetadataCache write_metadata_cache(_imp->environment,
write_cache_file, _imp->ebuild, _imp->master_mtime, _imp->eclass_mtimes, true);
@@ -210,13 +210,13 @@ EbuildID::need_keys_added() const
if (! ok)
{
- if (_imp->repository->params().cache.basename() != "empty")
+ if (_imp->repository->params().cache().basename() != "empty")
Log::get_instance()->message("e.ebuild.cache.no_usable", ll_qa, lc_no_context)
<< "No usable cache entry for '" + canonical_form(idcf_full);
std::string eapi_str(_imp->guessed_eapi);
if (eapi_str.empty())
- eapi_str = _imp->repository->params().eapi_when_unknown;
+ eapi_str = _imp->repository->params().eapi_when_unknown();
_imp->eapi = EAPIData::get_instance()->eapi_from_string(eapi_str);
if (_imp->eapi->supported())
@@ -232,19 +232,19 @@ 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::builddir>(_imp->repository->params().builddir()),
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::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::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::package_id>(shared_from_this()),
value_for<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),
+ (_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::sandbox>(phases.begin_phases()->option("sandbox")),
value_for<n::userpriv>(phases.begin_phases()->option("userpriv"))
));
@@ -258,7 +258,7 @@ EbuildID::need_keys_added() const
Log::get_instance()->message("e.ebuild.metadata.generated_eapi", ll_debug, lc_context) << "Generated metadata for '"
<< canonical_form(idcf_full) << "' has EAPI '" << _imp->eapi->name() << "'";
- if (_imp->repository->params().write_cache.basename() != "empty" && _imp->eapi->supported())
+ if (_imp->repository->params().write_cache().basename() != "empty" && _imp->eapi->supported())
{
EbuildFlatMetadataCache metadata_cache(_imp->environment, write_cache_file, _imp->ebuild, _imp->master_mtime,
_imp->eclass_mtimes, false);
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index d1cb720..39673f5 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -184,9 +184,9 @@ ExheresLayout::need_category_names() const
bool found_one(false);
std::list<FSEntry> cats_list;
- if (_imp->repository->params().master_repositories)
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ if (_imp->repository->params().master_repositories())
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
cats_list.push_back((*e)->layout()->categories_file());
cats_list.push_back(categories_file());
@@ -502,10 +502,10 @@ ExheresLayout::exlibsdirs_global() const
{
std::tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
- if (_imp->repository->params().master_repositories)
+ if (_imp->repository->params().master_repositories())
{
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
{
std::tr1::shared_ptr<const FSEntrySequence> master((*e)->layout()->exlibsdirs_global());
std::copy(master->begin(), master->end(), result->back_inserter());
@@ -521,10 +521,10 @@ ExheresLayout::exlibsdirs_category(const CategoryNamePart & c) const
{
std::tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
- if (_imp->repository->params().master_repositories)
+ if (_imp->repository->params().master_repositories())
{
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
{
std::tr1::shared_ptr<const FSEntrySequence> master((*e)->layout()->exlibsdirs_category(c));
std::copy(master->begin(), master->end(), result->back_inserter());
@@ -540,10 +540,10 @@ ExheresLayout::exlibsdirs_package(const QualifiedPackageName & q) const
{
std::tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
- if (_imp->repository->params().master_repositories)
+ if (_imp->repository->params().master_repositories())
{
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
{
std::tr1::shared_ptr<const FSEntrySequence> master((*e)->layout()->exlibsdirs_package(q));
std::copy(master->begin(), master->end(), result->back_inserter());
@@ -559,10 +559,10 @@ ExheresLayout::licenses_dirs() const
{
std::tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
- if (_imp->repository->params().master_repositories)
+ if (_imp->repository->params().master_repositories())
{
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
{
std::tr1::shared_ptr<const FSEntrySequence> master((*e)->layout()->licenses_dirs());
std::copy(master->begin(), master->end(), result->back_inserter());
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 4e71eb0..3a1229c 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -50,8 +50,6 @@
using namespace paludis;
using namespace paludis::erepository;
-#include <paludis/repositories/e/exndbam_repository-sr.cc>
-
namespace
{
bool supported_exndbam(const std::string & s)
@@ -75,15 +73,15 @@ namespace paludis
Implementation(const ExndbamRepositoryParams & p) :
params(p),
- ndbam(params.location, &supported_exndbam, "exndbam-1"),
+ ndbam(params.location(), &supported_exndbam, "exndbam-1"),
location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
- mkt_significant, params.location)),
+ mkt_significant, params.location())),
root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root",
- mkt_normal, params.root)),
+ mkt_normal, params.root())),
format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
mkt_significant, "vdb")),
builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
- mkt_normal, params.builddir))
+ mkt_normal, params.builddir()))
{
}
};
@@ -91,11 +89,12 @@ namespace paludis
ExndbamRepository::ExndbamRepository(const RepositoryName & n, const ExndbamRepositoryParams & p) :
EInstalledRepository(
- EInstalledRepositoryParams::create()
- .deprecated_world(p.deprecated_world)
- .environment(p.environment)
- .builddir(p.builddir)
- .root(p.root),
+ make_named_values<EInstalledRepositoryParams>(
+ value_for<n::builddir>(p.builddir()),
+ value_for<n::deprecated_world>(p.deprecated_world()),
+ value_for<n::environment>(p.environment()),
+ value_for<n::root>(p.root())
+ ),
n,
make_named_values<RepositoryCapabilities>(
value_for<n::destination_interface>(this),
@@ -173,12 +172,14 @@ ExndbamRepository::repository_factory_create(
return std::tr1::shared_ptr<Repository>(new ExndbamRepository(
RepositoryName(name),
- ExndbamRepositoryParams::create()
- .environment(env)
- .location(location)
- .root(root)
- .deprecated_world(deprecated_world)
- .builddir(builddir)));
+ make_named_values<ExndbamRepositoryParams>(
+ value_for<n::builddir>(builddir),
+ value_for<n::deprecated_world>(deprecated_world),
+ value_for<n::environment>(env),
+ value_for<n::location>(location),
+ value_for<n::root>(root)
+ )
+ ));
}
RepositoryName
@@ -224,7 +225,7 @@ ExndbamRepository::package_ids(const QualifiedPackageName & q) const
{
Lock l(*(*e).mutex());
if (! (*e).package_id())
- (*e).package_id().reset(new ExndbamID((*e).name(), (*e).version(), _imp->params.environment,
+ (*e).package_id().reset(new ExndbamID((*e).name(), (*e).version(), _imp->params.environment(),
shared_from_this(), (*e).fs_location(), &_imp->ndbam));
result->push_back((*e).package_id());
}
@@ -328,7 +329,7 @@ ExndbamRepository::merge(const MergeParams & m)
}
}
- FSEntry uid_dir(_imp->params.location);
+ FSEntry uid_dir(_imp->params.location());
if (if_same_name_id)
uid_dir = if_same_name_id->fs_location_key()->value().dirname();
else
@@ -350,7 +351,7 @@ 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>(_imp->params.environment()),
value_for<n::environment_file>(m.environment_file()),
value_for<n::output_directory>(target_ver_dir),
value_for<n::package_id>(std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id()))
@@ -373,8 +374,8 @@ ExndbamRepository::merge(const MergeParams & m)
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::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::environment>(_imp->params.environment()),
+ 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::options>(m.options()),
@@ -428,9 +429,9 @@ ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositor
{
Context context("When uninstalling '" + stringify(*id) + (replace ? "' for a reinstall:" : "':"));
- if (! _imp->params.root.is_directory())
+ if (! _imp->params.root().is_directory())
throw InstallActionError("Couldn't uninstall '" + stringify(*id) +
- "' because root ('" + stringify(_imp->params.root) + "') is not a directory");
+ "' because root ('" + stringify(_imp->params.root()) + "') is not a directory");
FSEntry ver_dir(id->fs_location_key()->value());
std::tr1::shared_ptr<FSEntry> load_env(new FSEntry(ver_dir / "environment.bz2"));
@@ -464,7 +465,7 @@ ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositor
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::environment>(_imp->params.environment()),
value_for<n::ndbam>(&_imp->ndbam),
value_for<n::package_id>(id),
value_for<n::root>(installed_root_key()->value())
@@ -476,17 +477,17 @@ ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositor
{
EbuildCommandParams params(
make_named_values<EbuildCommandParams>(
- value_for<n::builddir>(_imp->params.builddir),
+ value_for<n::builddir>(_imp->params.builddir()),
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::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
value_for<n::files_dir>(ver_dir),
value_for<n::package_id>(id),
- value_for<n::portdir>(_imp->params.location),
+ value_for<n::portdir>(_imp->params.location()),
value_for<n::sandbox>(phase->option("sandbox")),
value_for<n::userpriv>(phase->option("userpriv"))
));
@@ -495,7 +496,7 @@ ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositor
make_named_values<EbuildUninstallCommandParams>(
value_for<n::load_environment>(load_env.get()),
value_for<n::loadsaveenv_dir>(ver_dir),
- value_for<n::root>(stringify(_imp->params.root)),
+ value_for<n::root>(stringify(_imp->params.root())),
value_for<n::unmerge_only>(false)
));
diff --git a/paludis/repositories/e/exndbam_repository.hh b/paludis/repositories/e/exndbam_repository.hh
index d734a9d..ffbddad 100644
--- a/paludis/repositories/e/exndbam_repository.hh
+++ b/paludis/repositories/e/exndbam_repository.hh
@@ -29,12 +29,28 @@
namespace paludis
{
+ namespace n
+ {
+ struct builddir;
+ struct deprecated_world;
+ struct environment;
+ struct location;
+ struct root;
+ }
+
namespace erepository
{
class ERepositoryID;
- }
-#include <paludis/repositories/e/exndbam_repository-sr.hh>
+ struct ExndbamRepositoryParams
+ {
+ NamedValue<n::builddir, FSEntry> builddir;
+ NamedValue<n::deprecated_world, FSEntry> deprecated_world;
+ NamedValue<n::environment, Environment *> environment;
+ NamedValue<n::location, FSEntry> location;
+ NamedValue<n::root, FSEntry> root;
+ };
+ }
class PALUDIS_VISIBLE ExndbamRepository :
public erepository::EInstalledRepository,
@@ -52,7 +68,7 @@ namespace paludis
/**
* Constructor.
*/
- ExndbamRepository(const RepositoryName & n, const ExndbamRepositoryParams &);
+ ExndbamRepository(const RepositoryName & n, const erepository::ExndbamRepositoryParams &);
/**
* Destructor.
diff --git a/paludis/repositories/e/exndbam_repository.sr b/paludis/repositories/e/exndbam_repository.sr
deleted file mode 100644
index 84ba50e..0000000
--- a/paludis/repositories/e/exndbam_repository.sr
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-make_class_ExndbamRepositoryParams()
-{
- visible
-
- key environment "Environment *"
- key location FSEntry
- key root FSEntry
- key deprecated_world FSEntry
- key builddir FSEntry
-
- allow_named_args
-}
-
-
diff --git a/paludis/repositories/e/qa/categories.cc b/paludis/repositories/e/qa/categories.cc
index 81c2e52..edba7eb 100644
--- a/paludis/repositories/e/qa/categories.cc
+++ b/paludis/repositories/e/qa/categories.cc
@@ -48,7 +48,7 @@ paludis::erepository::categories_check(
if (! cats.is_regular_file_or_symlink_to_regular_file())
{
/* if the categories file exists but is not regular, or if we don't have a master */
- if (cats.exists() || ! (repo->params().master_repositories && ! repo->params().master_repositories->empty()))
+ if (cats.exists() || ! (repo->params().master_repositories() && ! repo->params().master_repositories()->empty()))
reporter.message(QAMessage(cats, qaml_severe, name, "Categories file is not a regular file"));
}
else
diff --git a/paludis/repositories/e/qa/qa_controller.cc b/paludis/repositories/e/qa/qa_controller.cc
index f75bc85..2b94739 100644
--- a/paludis/repositories/e/qa/qa_controller.cc
+++ b/paludis/repositories/e/qa/qa_controller.cc
@@ -397,24 +397,24 @@ QAController::run()
try
{
- if (_under_base_dir(_imp->repo->params().location))
+ if (_under_base_dir(_imp->repo->params().location()))
if (_imp->qa_checks.tree_checks_group()->end() !=
std::find_if(
_imp->qa_checks.tree_checks_group()->begin(),
_imp->qa_checks.tree_checks_group()->end(),
std::tr1::bind(std::equal_to<bool>(), false,
std::tr1::bind<bool>(std::tr1::mem_fn(&TreeCheckFunction::operator() ),
- _1, _imp->repo->params().location, std::tr1::ref(_imp->reporter),
+ _1, _imp->repo->params().location(), std::tr1::ref(_imp->reporter),
_imp->env, _imp->repo))))
{
- QAMessage(_imp->repo->params().location, qaml_severe, "tree_checks_group",
+ QAMessage(_imp->repo->params().location(), qaml_severe, "tree_checks_group",
"Tree checks failed. Not continuing.");
return;
}
- _imp->reporter.flush(_imp->repo->params().location);
+ _imp->reporter.flush(_imp->repo->params().location());
- std::for_each(_imp->repo->params().eclassdirs->begin(),
- _imp->repo->params().eclassdirs->end(),
+ std::for_each(_imp->repo->params().eclassdirs()->begin(),
+ _imp->repo->params().eclassdirs()->end(),
std::tr1::bind(&QAController::_check_eclasses, this, _1, ".eclass"));
std::tr1::shared_ptr<const FSEntrySequence> exlibs(_imp->repo->layout()->exlibsdirs_global());
@@ -441,7 +441,7 @@ QAController::run()
catch (const Exception & e)
{
_imp->reporter.message(
- QAMessage(_imp->repo->params().location, qaml_severe, "run",
+ QAMessage(_imp->repo->params().location(), qaml_severe, "run",
"Caught exception '" + e.message() + "' (" + e.what() + ")"));
}
}
diff --git a/paludis/repositories/e/qa/visibility.cc b/paludis/repositories/e/qa/visibility.cc
index 0fcd93c..37e6e84 100644
--- a/paludis/repositories/e/qa/visibility.cc
+++ b/paludis/repositories/e/qa/visibility.cc
@@ -170,10 +170,10 @@ namespace
else
{
bool found_repo(false), repo_masked(false);
- if (repo->params().master_repositories)
+ if (repo->params().master_repositories())
{
- for (ERepositorySequence::ConstIterator e(repo->params().master_repositories->begin()),
- e_end(repo->params().master_repositories->end()) ; e != e_end ; ++e)
+ for (ERepositorySequence::ConstIterator e(repo->params().master_repositories()->begin()),
+ e_end(repo->params().master_repositories()->end()) ; e != e_end ; ++e)
{
if ((*i)->repository()->name() == (*e)->name())
{
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 315d268..05dcbbf 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -175,9 +175,9 @@ TraditionalLayout::need_category_names() const
bool found_one(false);
std::list<FSEntry> cats_list;
- if (_imp->repository->params().master_repositories)
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ if (_imp->repository->params().master_repositories())
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
cats_list.push_back((*e)->layout()->categories_file());
cats_list.push_back(categories_file());
@@ -512,10 +512,10 @@ TraditionalLayout::exlibsdirs_global() const
{
std::tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
- if (_imp->repository->params().master_repositories)
+ if (_imp->repository->params().master_repositories())
{
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
{
std::tr1::shared_ptr<const FSEntrySequence> master((*e)->layout()->exlibsdirs_global());
std::copy(master->begin(), master->end(), result->back_inserter());
@@ -531,10 +531,10 @@ TraditionalLayout::exlibsdirs_category(const CategoryNamePart & c) const
{
std::tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
- if (_imp->repository->params().master_repositories)
+ if (_imp->repository->params().master_repositories())
{
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
{
std::tr1::shared_ptr<const FSEntrySequence> master((*e)->layout()->exlibsdirs_category(c));
std::copy(master->begin(), master->end(), result->back_inserter());
@@ -550,10 +550,10 @@ TraditionalLayout::exlibsdirs_package(const QualifiedPackageName & q) const
{
std::tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
- if (_imp->repository->params().master_repositories)
+ if (_imp->repository->params().master_repositories())
{
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
{
std::tr1::shared_ptr<const FSEntrySequence> master((*e)->layout()->exlibsdirs_package(q));
std::copy(master->begin(), master->end(), result->back_inserter());
@@ -569,10 +569,10 @@ TraditionalLayout::licenses_dirs() const
{
std::tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
- if (_imp->repository->params().master_repositories)
+ if (_imp->repository->params().master_repositories())
{
- for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories->begin()),
- e_end(_imp->repository->params().master_repositories->end()) ; e != e_end ; ++e)
+ for (ERepositorySequence::ConstIterator e(_imp->repository->params().master_repositories()->begin()),
+ e_end(_imp->repository->params().master_repositories()->end()) ; e != e_end ; ++e)
{
std::tr1::shared_ptr<const FSEntrySequence> master((*e)->layout()->licenses_dirs());
std::copy(master->begin(), master->end(), result->back_inserter());
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 075db52..d50e4ef 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -84,8 +84,6 @@
using namespace paludis;
using namespace paludis::erepository;
-#include <paludis/repositories/e/vdb_repository-sr.cc>
-
typedef std::tr1::unordered_map<CategoryNamePart, std::tr1::shared_ptr<QualifiedPackageNameSet>, Hash<CategoryNamePart> > CategoryMap;
typedef std::tr1::unordered_map<QualifiedPackageName, std::tr1::shared_ptr<PackageIDSequence>, Hash<QualifiedPackageName> > IDMap;
typedef std::map<std::pair<QualifiedPackageName, VersionSpec>, std::tr1::shared_ptr<const Sequence<QualifiedPackageName> > > ProvidesMap;
@@ -126,19 +124,19 @@ namespace paludis
has_category_names(false),
tried_provides_cache(false),
used_provides_cache(false),
- names_cache(new RepositoryNameCache(p.names_cache, r)),
+ names_cache(new RepositoryNameCache(p.names_cache(), r)),
location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
- mkt_significant, params.location)),
+ mkt_significant, params.location())),
root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root",
- mkt_normal, params.root)),
+ mkt_normal, params.root())),
format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
mkt_significant, "vdb")),
provides_cache_key(new LiteralMetadataValueKey<FSEntry> ("provides_cache", "provides_cache",
- mkt_normal, params.provides_cache)),
+ mkt_normal, params.provides_cache())),
names_cache_key(new LiteralMetadataValueKey<FSEntry> ("names_cache", "names_cache",
- mkt_normal, params.names_cache)),
+ mkt_normal, params.names_cache())),
builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
- mkt_normal, params.builddir))
+ mkt_normal, params.builddir()))
{
}
@@ -149,12 +147,13 @@ namespace paludis
VDBRepository::VDBRepository(const VDBRepositoryParams & p) :
EInstalledRepository(
- EInstalledRepositoryParams::create()
- .environment(p.environment)
- .root(p.root)
- .builddir(p.builddir)
- .deprecated_world(p.deprecated_world),
- p.name,
+ make_named_values<EInstalledRepositoryParams>(
+ value_for<n::builddir>(p.builddir()),
+ value_for<n::deprecated_world>(p.deprecated_world()),
+ value_for<n::environment>(p.environment()),
+ value_for<n::root>(p.root())
+ ),
+ p.name(),
make_named_values<RepositoryCapabilities>(
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
@@ -346,15 +345,16 @@ VDBRepository::repository_factory_create(
if (name.empty())
name = "installed";
- return std::tr1::shared_ptr<Repository>(new VDBRepository(VDBRepositoryParams::create()
- .environment(env)
- .location(location)
- .root(root)
- .deprecated_world(deprecated_world)
- .builddir(builddir)
- .provides_cache(provides_cache)
- .name(RepositoryName(name))
- .names_cache(names_cache)));
+ return std::tr1::shared_ptr<Repository>(new VDBRepository(make_named_values<VDBRepositoryParams>(
+ value_for<n::builddir>(builddir),
+ value_for<n::deprecated_world>(deprecated_world),
+ 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)
+ )));
}
RepositoryName
@@ -395,17 +395,17 @@ VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID>
{
Context context("When uninstalling '" + stringify(*id) + (reinstalling ? "' for a reinstall:" : "':"));
- if (! _imp->params.root.is_directory())
+ if (! _imp->params.root().is_directory())
throw InstallActionError("Couldn't uninstall '" + stringify(*id) +
- "' because root ('" + stringify(_imp->params.root) + "') is not a directory");
+ "' because root ('" + stringify(_imp->params.root()) + "') is not a directory");
std::string reinstalling_str(reinstalling ? "-reinstalling-" : "");
std::tr1::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
- eclassdirs->push_back(FSEntry(_imp->params.location / stringify(id->name().category) /
+ eclassdirs->push_back(FSEntry(_imp->params.location() / stringify(id->name().category) /
(reinstalling_str + stringify(id->name().package) + "-" + stringify(id->version()))));
- FSEntry pkg_dir(_imp->params.location / stringify(id->name().category) / (reinstalling_str +
+ FSEntry pkg_dir(_imp->params.location() / stringify(id->name().category) / (reinstalling_str +
stringify(id->name().package) + "-" + stringify(id->version())));
std::tr1::shared_ptr<FSEntry> load_env(new FSEntry(pkg_dir / "environment.bz2"));
@@ -437,7 +437,7 @@ VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID>
value_for<n::config_protect_mask>(config_protect_mask),
value_for<n::contents_file>(pkg_dir / "CONTENTS"),
- value_for<n::environment>(_imp->params.environment),
+ value_for<n::environment>(_imp->params.environment()),
value_for<n::package_id>(id),
value_for<n::root>(installed_root_key()->value())
));
@@ -447,17 +447,17 @@ VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID>
else
{
EbuildCommandParams params(make_named_values<EbuildCommandParams>(
- value_for<n::builddir>(_imp->params.builddir),
+ value_for<n::builddir>(_imp->params.builddir()),
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::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
value_for<n::files_dir>(pkg_dir),
value_for<n::package_id>(id),
- value_for<n::portdir>(_imp->params.location),
+ value_for<n::portdir>(_imp->params.location()),
value_for<n::sandbox>(phase->option("sandbox")),
value_for<n::userpriv>(phase->option("userpriv"))
));
@@ -465,7 +465,7 @@ VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID>
EbuildUninstallCommandParams uninstall_params(make_named_values<EbuildUninstallCommandParams>(
value_for<n::load_environment>(load_env.get()),
value_for<n::loadsaveenv_dir>(pkg_dir),
- value_for<n::root>(stringify(_imp->params.root)),
+ value_for<n::root>(stringify(_imp->params.root())),
value_for<n::unmerge_only>(false)
));
@@ -560,20 +560,20 @@ VDBRepository::load_provided_using_cache() const
Lock l(*_imp->big_nasty_mutex);
_imp->tried_provides_cache = true;
- if (_imp->params.provides_cache == FSEntry("/var/empty"))
+ if (_imp->params.provides_cache() == FSEntry("/var/empty"))
return false;
- Context context("When loading VDB PROVIDEs map using '" + stringify(_imp->params.provides_cache) + "':");
+ Context context("When loading VDB PROVIDEs map using '" + stringify(_imp->params.provides_cache()) + "':");
- if (! _imp->params.provides_cache.is_regular_file())
+ if (! _imp->params.provides_cache().is_regular_file())
{
Log::get_instance()->message("e.vdb.provides_cache.not_regular_file", ll_warning, lc_no_context)
- << "Provides cache at '" << _imp->params.provides_cache << "' is not a regular file. Perhaps you need to regenerate "
+ << "Provides cache at '" << _imp->params.provides_cache() << "' is not a regular file. Perhaps you need to regenerate "
"the cache using 'paludis --regenerate-installed-cache'?";
return false;
}
- std::ifstream provides_cache(stringify(_imp->params.provides_cache).c_str());
+ std::ifstream provides_cache(stringify(_imp->params.provides_cache()).c_str());
std::string version;
std::getline(provides_cache, version);
@@ -581,7 +581,7 @@ VDBRepository::load_provided_using_cache() const
if (version != "paludis-3")
{
Log::get_instance()->message("e.vdb.provides_cache.unsupported", ll_warning, lc_no_context) << "Can't use provides cache at '"
- << _imp->params.provides_cache << "' because format '" << version << "' is not 'paludis-3'. Perhaps you need to regenerate "
+ << _imp->params.provides_cache() << "' because format '" << version << "' is not 'paludis-3'. Perhaps you need to regenerate "
"the cache using 'paludis --regenerate-installed-cache'?";
return false;
}
@@ -591,7 +591,7 @@ VDBRepository::load_provided_using_cache() const
if (for_name != stringify(name()))
{
Log::get_instance()->message("e.vdb.provides_cache.unusable", ll_warning, lc_no_context)
- << "Can't use provides cache at '" << _imp->params.provides_cache << "' because it was generated for repository '"
+ << "Can't use provides cache at '" << _imp->params.provides_cache() << "' because it was generated for repository '"
<< for_name << "'. You must not have multiple provides caches at the same location.";
return false;
}
@@ -650,7 +650,7 @@ VDBRepository::provides_from_package_id(const PackageID & id) const
return;
std::tr1::shared_ptr<const ProvideSpecTree::ConstItem> provide(id.provide_key()->value());
- DepSpecFlattener<ProvideSpecTree, PackageDepSpec> f(_imp->params.environment);
+ DepSpecFlattener<ProvideSpecTree, PackageDepSpec> f(_imp->params.environment());
provide->accept(f);
std::tr1::shared_ptr<Sequence<QualifiedPackageName> > qpns(new Sequence<QualifiedPackageName>);
@@ -723,13 +723,13 @@ VDBRepository::load_provided_the_slow_way() const
void
VDBRepository::write_provides_cache() const
{
- Context context("When saving provides cache to '" + stringify(_imp->params.provides_cache) + "':");
+ Context context("When saving provides cache to '" + stringify(_imp->params.provides_cache()) + "':");
- std::ofstream f(stringify(_imp->params.provides_cache).c_str());
+ std::ofstream f(stringify(_imp->params.provides_cache()).c_str());
if (! f)
{
Log::get_instance()->message("e.vdb.provides.write_failed", ll_warning, lc_context) << "Cannot write to '" <<
- _imp->params.provides_cache << "': " << std::strerror(errno);
+ _imp->params.provides_cache() << "': " << std::strerror(errno);
return;
}
@@ -763,14 +763,14 @@ VDBRepository::regenerate_provides_cache() const
using namespace std::tr1::placeholders;
- if (_imp->params.provides_cache == FSEntry("/var/empty"))
+ if (_imp->params.provides_cache() == FSEntry("/var/empty"))
return;
Context context("When generating VDB repository provides cache at '"
- + stringify(_imp->params.provides_cache) + "':");
+ + stringify(_imp->params.provides_cache()) + "':");
- FSEntry(_imp->params.provides_cache).unlink();
- _imp->params.provides_cache.dirname().mkdir();
+ FSEntry(_imp->params.provides_cache()).unlink();
+ _imp->params.provides_cache().dirname().mkdir();
load_provided_the_slow_way();
write_provides_cache();
@@ -801,7 +801,7 @@ VDBRepository::merge(const MergeParams & m)
std::tr1::shared_ptr<const ERepositoryID> is_replace(package_id_if_exists(m.package_id()->name(), m.package_id()->version()));
- FSEntry tmp_vdb_dir(_imp->params.location);
+ FSEntry tmp_vdb_dir(_imp->params.location());
if (! tmp_vdb_dir.exists())
tmp_vdb_dir.mkdir();
tmp_vdb_dir /= stringify(m.package_id()->name().category);
@@ -812,7 +812,7 @@ 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>(_imp->params.environment()),
value_for<n::environment_file>(m.environment_file()),
value_for<n::output_directory>(tmp_vdb_dir),
value_for<n::package_id>(std::tr1::static_pointer_cast<const ERepositoryID>(m.package_id()))
@@ -830,7 +830,7 @@ VDBRepository::merge(const MergeParams & m)
config_protect_mask = std::string((std::istreambuf_iterator<char>(c_m)), std::istreambuf_iterator<char>());
}
- FSEntry vdb_dir(_imp->params.location);
+ FSEntry vdb_dir(_imp->params.location());
vdb_dir /= stringify(m.package_id()->name().category);
vdb_dir /= (stringify(m.package_id()->name().package) + "-" + stringify(m.package_id()->version()));
@@ -839,7 +839,7 @@ VDBRepository::merge(const MergeParams & m)
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::environment>(_imp->params.environment()),
value_for<n::image>(m.image_dir()),
value_for<n::options>(m.options()),
value_for<n::package_id>(m.package_id()),
@@ -858,7 +858,7 @@ VDBRepository::merge(const MergeParams & m)
if (is_replace)
{
- FSEntry old_vdb_dir(_imp->params.location);
+ FSEntry old_vdb_dir(_imp->params.location());
old_vdb_dir /= stringify(is_replace->name().category);
old_vdb_dir /= (stringify(is_replace->name().package) + "-" + stringify(is_replace->version()));
@@ -913,9 +913,9 @@ VDBRepository::need_category_names() const
if (_imp->has_category_names)
return;
- Context context("When loading category names from '" + stringify(_imp->params.location) + "':");
+ Context context("When loading category names from '" + stringify(_imp->params.location()) + "':");
- for (DirIterator d(_imp->params.location, DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
+ for (DirIterator d(_imp->params.location(), DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
try
{
if (d->is_directory_or_symlink_to_directory())
@@ -943,12 +943,12 @@ VDBRepository::need_package_ids(const CategoryNamePart & c) const
if (_imp->categories[c])
return;
- Context context("When loading package names from '" + stringify(_imp->params.location) +
+ Context context("When loading package names from '" + stringify(_imp->params.location()) +
"' in category '" + stringify(c) + "':");
std::tr1::shared_ptr<QualifiedPackageNameSet> q(new QualifiedPackageNameSet);
- for (DirIterator d(_imp->params.location / stringify(c), DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
+ for (DirIterator d(_imp->params.location() / stringify(c), DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
try
{
if (d->is_directory_or_symlink_to_directory())
@@ -958,7 +958,7 @@ VDBRepository::need_package_ids(const CategoryNamePart & c) const
continue;
PackageDepSpec p(parse_user_package_dep_spec("=" + stringify(c) + "/" + s,
- _imp->params.environment, UserPackageDepSpecOptions()));
+ _imp->params.environment(), UserPackageDepSpecOptions()));
q->insert(*p.package_ptr());
IDMap::iterator i(_imp->ids.find(*p.package_ptr()));
if (_imp->ids.end() == i)
@@ -986,7 +986,7 @@ VDBRepository::make_id(const QualifiedPackageName & q, const VersionSpec & v, co
Context context("When creating ID for '" + stringify(q) + "-" + stringify(v) + "' from '" + stringify(f) + "':");
- std::tr1::shared_ptr<VDBID> result(new VDBID(q, v, _imp->params.environment, shared_from_this(), f));
+ std::tr1::shared_ptr<VDBID> result(new VDBID(q, v, _imp->params.environment(), shared_from_this(), f));
return result;
}
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index 3edc3d3..8eb6a38 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -38,8 +38,32 @@
namespace paludis
{
-
-#include <paludis/repositories/e/vdb_repository-sr.hh>
+ namespace n
+ {
+ struct builddir;
+ struct deprecated_world;
+ struct environment;
+ struct location;
+ struct name;
+ struct names_cache;
+ struct provides_cache;
+ struct root;
+ }
+
+ namespace erepository
+ {
+ struct VDBRepositoryParams
+ {
+ NamedValue<n::builddir, FSEntry> builddir;
+ NamedValue<n::deprecated_world, FSEntry> deprecated_world;
+ NamedValue<n::environment, Environment *> environment;
+ NamedValue<n::location, FSEntry> location;
+ NamedValue<n::name, RepositoryName> name;
+ NamedValue<n::names_cache, FSEntry> names_cache;
+ NamedValue<n::provides_cache, FSEntry> provides_cache;
+ NamedValue<n::root, FSEntry> root;
+ };
+ }
/**
* A VDBRepository represents the /var/db/pkg database used for
@@ -84,7 +108,7 @@ namespace paludis
/**
* Constructor.
*/
- VDBRepository(const VDBRepositoryParams &);
+ VDBRepository(const erepository::VDBRepositoryParams &);
/**
* Destructor.
diff --git a/paludis/repositories/e/vdb_repository.sr b/paludis/repositories/e/vdb_repository.sr
deleted file mode 100644
index c687a0d..0000000
--- a/paludis/repositories/e/vdb_repository.sr
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-make_class_VDBRepositoryParams()
-{
- visible
-
- key environment "Environment *"
- key location FSEntry
- key root FSEntry
- key deprecated_world FSEntry
- key provides_cache FSEntry
- key names_cache FSEntry
- key builddir FSEntry
- key name RepositoryName
-
- doxygen_comment << "END"
- /**
- * Parameters used to create a VDBRepository
- *
- * \see VDBRepository
- * \ingroup grpvdbrepository
- * \nosubgrouping
- */
-END
-
- allow_named_args
-}
-