aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-08-27 22:09:35 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-08-27 22:09:35 +0100
commit07219185f96f934756b321aff77229a42c37fda4 (patch)
treec6279c4eba40f0c5737bd7a8318f6720810e98e2
parentac897c9a5c573313f99253bae5a899a06c84fb4e (diff)
downloadpaludis-07219185f96f934756b321aff77229a42c37fda4.tar.gz
paludis-07219185f96f934756b321aff77229a42c37fda4.tar.xz
Pass distribution KeyValueConfigFile by sptr.
Lets distribution data classes keep it around for later if necessary.
-rw-r--r--paludis/distribution-impl.hh4
-rw-r--r--paludis/environments/paludis/extra_distribution_data.cc20
-rw-r--r--paludis/repositories/gems/extra_distribution_data.cc4
-rw-r--r--paludis/repository_blacklist.txt0
4 files changed, 14 insertions, 14 deletions
diff --git a/paludis/distribution-impl.hh b/paludis/distribution-impl.hh
index 372b787..25964f1 100644
--- a/paludis/distribution-impl.hh
+++ b/paludis/distribution-impl.hh
@@ -65,8 +65,8 @@ namespace paludis
if (this->_imp->values.end() != v)
return v->second;
- KeyValueConfigFile k(d.extra_data_dir() / ExtraDistributionDataData<Data_>::config_file_name(),
- KeyValueConfigFileOptions(), &KeyValueConfigFile::no_defaults, &KeyValueConfigFile::no_transformation);
+ std::tr1::shared_ptr<KeyValueConfigFile> k(new KeyValueConfigFile(d.extra_data_dir() / ExtraDistributionDataData<Data_>::config_file_name(),
+ KeyValueConfigFileOptions(), &KeyValueConfigFile::no_defaults, &KeyValueConfigFile::no_transformation));
std::tr1::shared_ptr<const Data_> data(ExtraDistributionDataData<Data_>::make_data(k));
this->_imp->values.insert(std::make_pair(d.name(), data));
return data;
diff --git a/paludis/environments/paludis/extra_distribution_data.cc b/paludis/environments/paludis/extra_distribution_data.cc
index 968eb9a..345d67e 100644
--- a/paludis/environments/paludis/extra_distribution_data.cc
+++ b/paludis/environments/paludis/extra_distribution_data.cc
@@ -35,18 +35,18 @@ namespace paludis
return "paludis.conf";
}
- static std::tr1::shared_ptr<PaludisDistribution> make_data(const KeyValueConfigFile & k)
+ static std::tr1::shared_ptr<PaludisDistribution> make_data(const std::tr1::shared_ptr<const KeyValueConfigFile> & k)
{
return make_shared_ptr(new PaludisDistribution(make_named_values<PaludisDistribution>(
- value_for<n::bashrc_filename>(k.get("bashrc_filename")),
- value_for<n::keywords_filename_part>(k.get("keywords_filename_part")),
- value_for<n::licenses_filename_part>(k.get("licenses_filename_part")),
- value_for<n::mirrors_filename_part>(k.get("mirrors_filename_part")),
- value_for<n::package_mask_filename_part>(k.get("package_mask_filename_part")),
- value_for<n::package_unmask_filename_part>(k.get("package_unmask_filename_part")),
- value_for<n::repositories_directory>(k.get("repositories_directory")),
- value_for<n::repository_defaults_filename_part>(k.get("repository_defaults_filename_part")),
- value_for<n::use_filename_part>(k.get("use_filename_part"))
+ value_for<n::bashrc_filename>(k->get("bashrc_filename")),
+ value_for<n::keywords_filename_part>(k->get("keywords_filename_part")),
+ value_for<n::licenses_filename_part>(k->get("licenses_filename_part")),
+ value_for<n::mirrors_filename_part>(k->get("mirrors_filename_part")),
+ value_for<n::package_mask_filename_part>(k->get("package_mask_filename_part")),
+ value_for<n::package_unmask_filename_part>(k->get("package_unmask_filename_part")),
+ value_for<n::repositories_directory>(k->get("repositories_directory")),
+ value_for<n::repository_defaults_filename_part>(k->get("repository_defaults_filename_part")),
+ value_for<n::use_filename_part>(k->get("use_filename_part"))
)));
}
};
diff --git a/paludis/repositories/gems/extra_distribution_data.cc b/paludis/repositories/gems/extra_distribution_data.cc
index 5d8de49..43ce4f3 100644
--- a/paludis/repositories/gems/extra_distribution_data.cc
+++ b/paludis/repositories/gems/extra_distribution_data.cc
@@ -35,10 +35,10 @@ namespace paludis
return "gems.conf";
}
- static std::tr1::shared_ptr<GemsDistribution> make_data(const KeyValueConfigFile & k)
+ static std::tr1::shared_ptr<GemsDistribution> make_data(const std::tr1::shared_ptr<const KeyValueConfigFile> & k)
{
return make_shared_ptr(new GemsDistribution(make_named_values<GemsDistribution>(
- value_for<n::default_buildroot>(k.get("default_buildroot"))
+ value_for<n::default_buildroot>(k->get("default_buildroot"))
)));
}
};
diff --git a/paludis/repository_blacklist.txt b/paludis/repository_blacklist.txt
deleted file mode 100644
index e69de29..0000000
--- a/paludis/repository_blacklist.txt
+++ /dev/null