aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments/paludis
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-28 20:58:20 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-28 20:58:20 +0000
commitc52338eefbb54ab15490f65fa9207da2f96448b6 (patch)
tree4258c3fab4af9e4d2ec28a9f80690a9680af839f /paludis/environments/paludis
parentb8cc1f18652e2c39f4c7cad5e322e13f4686ed21 (diff)
downloadpaludis-c52338eefbb54ab15490f65fa9207da2f96448b6.tar.gz
paludis-c52338eefbb54ab15490f65fa9207da2f96448b6.tar.xz
Distribution definable defaults. Fixes: ticket:263
Diffstat (limited to 'paludis/environments/paludis')
-rw-r--r--paludis/environments/paludis/Makefile.am2
-rw-r--r--paludis/environments/paludis/paludis_config.cc19
-rw-r--r--paludis/environments/paludis/paludis_environment.cc1
3 files changed, 15 insertions, 7 deletions
diff --git a/paludis/environments/paludis/Makefile.am b/paludis/environments/paludis/Makefile.am
index 97bcce6be..8707a57d6 100644
--- a/paludis/environments/paludis/Makefile.am
+++ b/paludis/environments/paludis/Makefile.am
@@ -71,6 +71,8 @@ TESTS = paludis_environment_TEST
TESTS_ENVIRONMENT = env \
PALUDIS_EBUILD_DIR="$(top_srcdir)/ebuild/" \
+ PALUDIS_EAPIS_DIR="$(top_srcdir)/paludis/eapis/" \
+ PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \
PALUDIS_SKIP_CONFIG="yes" \
PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \
TEST_SCRIPT_DIR="$(srcdir)/" \
diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc
index 041c1d470..21e43c224 100644
--- a/paludis/environments/paludis/paludis_config.cc
+++ b/paludis/environments/paludis/paludis_config.cc
@@ -26,6 +26,7 @@
#include <paludis/environments/paludis/package_mask_conf.hh>
#include <paludis/config_file.hh>
+#include <paludis/distribution.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/destringify.hh>
#include <paludis/util/dir_iterator.hh>
@@ -253,19 +254,23 @@ PaludisConfig::PaludisConfig(PaludisEnvironment * const e, const std::string & s
{
/* add virtuals repositories */
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > iv_keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
- iv_keys->insert("root", root_prefix.empty() ? "/" : root_prefix);
- _imp->repos.push_back(RepositoryConfigEntry("installed_virtuals", -1, iv_keys));
+ if (DistributionData::get_instance()->default_distribution()->support_old_style_virtuals)
+ {
+ tr1::shared_ptr<AssociativeCollection<std::string, std::string> > iv_keys(
+ new AssociativeCollection<std::string, std::string>::Concrete);
+ iv_keys->insert("root", root_prefix.empty() ? "/" : root_prefix);
+ _imp->repos.push_back(RepositoryConfigEntry("installed_virtuals", -1, iv_keys));
- _imp->repos.push_back(RepositoryConfigEntry("virtuals", -2,
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> >()));
+ _imp->repos.push_back(RepositoryConfigEntry("virtuals", -2,
+ tr1::shared_ptr<AssociativeCollection<std::string, std::string> >()));
+ }
/* add normal repositories */
if ((local_config_dir / "repository_defaults.conf").exists())
{
- KeyValueConfigFile defaults_file(local_config_dir / "repository_defaults.conf", KeyValueConfigFileOptions(), KeyValueConfigFile::Defaults(conf_vars));
+ KeyValueConfigFile defaults_file(local_config_dir / "repository_defaults.conf", KeyValueConfigFileOptions(),
+ KeyValueConfigFile::Defaults(conf_vars));
std::copy(defaults_file.begin(), defaults_file.end(), conf_vars->inserter());
}
else if ((local_config_dir / "repository_defaults.bash").exists())
diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc
index 18d6f9644..0b083e8d7 100644
--- a/paludis/environments/paludis/paludis_environment.cc
+++ b/paludis/environments/paludis/paludis_environment.cc
@@ -30,6 +30,7 @@
#include <paludis/config_file.hh>
#include <paludis/hooker.hh>
#include <paludis/set_file.hh>
+#include <paludis/distribution.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/log.hh>