aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-28 17:51:23 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-28 17:51:23 +0000
commit44d4b03d9d2a4a3638d086f09f6acb9b9bf46d2d (patch)
tree7c3d79d621621b15beeb8d931160e623eb8fab51
parentfb2e8ebe63804349399604528ccff9b60c3d8d17 (diff)
downloadpaludis-44d4b03d9d2a4a3638d086f09f6acb9b9bf46d2d.tar.gz
paludis-44d4b03d9d2a4a3638d086f09f6acb9b9bf46d2d.tar.xz
Allow distributions to set some defaults for VDB too
-rw-r--r--paludis/distribution.cc2
-rw-r--r--paludis/distribution.sr3
-rw-r--r--paludis/distributions/gentoo.conf3
-rw-r--r--paludis/repositories/e/vdb_repository.cc27
4 files changed, 27 insertions, 8 deletions
diff --git a/paludis/distribution.cc b/paludis/distribution.cc
index 0f711f1..52a470d 100644
--- a/paludis/distribution.cc
+++ b/paludis/distribution.cc
@@ -75,6 +75,8 @@ namespace paludis
.default_ebuild_eapi_when_unknown(k.get("default_ebuild_eapi_when_unknown"))
.default_ebuild_eapi_when_unspecified(k.get("default_ebuild_eapi_when_unspecified"))
.default_ebuild_profile_eapi(k.get("default_ebuild_profile_eapi"))
+ .default_vdb_provides_cache(k.get("default_vdb_provides_cache"))
+ .default_vdb_names_cache(k.get("default_vdb_names_cache"))
.paludis_environment_use_conf_filename(k.get("paludis_environment_use_conf_filename"))
.paludis_environment_keywords_conf_filename(k.get("paludis_environment_keywords_conf_filename"))
.concept_use(k.get("concept_use"))
diff --git a/paludis/distribution.sr b/paludis/distribution.sr
index 2c44cd1..0127da4 100644
--- a/paludis/distribution.sr
+++ b/paludis/distribution.sr
@@ -16,6 +16,9 @@ make_class_Distribution()
key default_ebuild_eapi_when_unspecified std::string
key default_ebuild_profile_eapi std::string
+ key default_vdb_provides_cache std::string
+ key default_vdb_names_cache std::string
+
key paludis_environment_use_conf_filename std::string
key paludis_environment_keywords_conf_filename std::string
diff --git a/paludis/distributions/gentoo.conf b/paludis/distributions/gentoo.conf
index 3353642..af327da 100644
--- a/paludis/distributions/gentoo.conf
+++ b/paludis/distributions/gentoo.conf
@@ -13,6 +13,9 @@ default_ebuild_eapi_when_unknown = 0
default_ebuild_eapi_when_unspecified = 0
default_ebuild_profile_eapi = 0
+default_vdb_provides_cache =
+default_vdb_names_cache =
+
paludis_environment_use_conf_filename = use.conf
paludis_environment_keywords_conf_filename = keywords.conf
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 658eac0..1eb3bea 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -31,6 +31,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/dep_spec_flattener.hh>
#include <paludis/dep_tag.hh>
+#include <paludis/distribution.hh>
#include <paludis/environment.hh>
#include <paludis/hashed_containers.hh>
#include <paludis/hook.hh>
@@ -303,19 +304,29 @@ VDBRepository::make_vdb_repository(
std::string provides_cache;
if (m->end() == m->find("provides_cache") || ((provides_cache = m->find("provides_cache")->second)).empty())
{
- Log::get_instance()->message(ll_warning, lc_no_context, "The provides_cache key is not set in '"
- + repo_file + "'. You should read http://paludis.pioto.org/cachefiles.html and select an "
- "appropriate value.");
- provides_cache = "/var/empty";
+ provides_cache = DistributionData::get_instance()->distribution_from_string(
+ env->default_distribution())->default_vdb_provides_cache;
+ if (provides_cache.empty())
+ {
+ Log::get_instance()->message(ll_warning, lc_no_context, "The provides_cache key is not set in '"
+ + repo_file + "'. You should read http://paludis.pioto.org/cachefiles.html and select an "
+ "appropriate value.");
+ provides_cache = "/var/empty";
+ }
}
std::string names_cache;
if (m->end() == m->find("names_cache") || ((names_cache = m->find("names_cache")->second)).empty())
{
- Log::get_instance()->message(ll_warning, lc_no_context, "The names_cache key is not set in '"
- + repo_file + "'. You should read http://paludis.pioto.org/cachefiles.html and select an "
- "appropriate value.");
- names_cache = "/var/empty";
+ names_cache = DistributionData::get_instance()->distribution_from_string(
+ env->default_distribution())->default_vdb_names_cache;
+ if (names_cache.empty())
+ {
+ Log::get_instance()->message(ll_warning, lc_no_context, "The names_cache key is not set in '"
+ + repo_file + "'. You should read http://paludis.pioto.org/cachefiles.html and select an "
+ "appropriate value.");
+ names_cache = "/var/empty";
+ }
}
std::string buildroot;