aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-07 07:05:18 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-07 07:05:18 +0000
commite1c4eb8abf354dbb77fdad73456d3628d0eefb39 (patch)
tree5af8909f3d47a645266b1872451f1ab16119e957
parent37adc6c0fefaef1b2d130f50667d9c348e8b1f65 (diff)
downloadpaludis-e1c4eb8abf354dbb77fdad73456d3628d0eefb39.tar.gz
paludis-e1c4eb8abf354dbb77fdad73456d3628d0eefb39.tar.xz
Better context messages for broken ~/.paludis/ files
-rw-r--r--paludis/default_config.cc1
-rw-r--r--paludis/portage_repository.cc3
2 files changed, 4 insertions, 0 deletions
diff --git a/paludis/default_config.cc b/paludis/default_config.cc
index c25612e..931b16a 100644
--- a/paludis/default_config.cc
+++ b/paludis/default_config.cc
@@ -86,6 +86,7 @@ DefaultConfig::DefaultConfig()
importance = destringify<int>(k.get("importance"));
std::map<std::string, std::string> keys(k.begin(), k.end());
+ keys["repo_file"] = stringify(*repo_file);
_repos.push_back(RepositoryConfigEntry(format, importance, keys));
}
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index dce2b00..90bf260 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -757,6 +757,9 @@ PortageRepository::make_portage_repository(
const PackageDatabase * const db,
const std::map<std::string, std::string> & m)
{
+ Context context("When making Portage repository from repo_file '" +
+ (m.end() == m.find("repo_file") ? std::string("?") : m.find("repo_file")->second) + "':");
+
std::string location;
if (m.end() == m.find("location") || ((location = m.find("location")->second)).empty())
throw PortageRepositoryConfigurationError("Key 'location' not specified or empty");