aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-21 11:22:09 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-21 11:22:09 +0000
commit5b54c8f5395bd8043221e1aaba09042d3585242e (patch)
tree95a65fd91b475728b8d02e8c85c551df0fbda956
parent847a48100b740be5f1432f8c98f87ac63c0432db (diff)
downloadpaludis-5b54c8f5395bd8043221e1aaba09042d3585242e.tar.gz
paludis-5b54c8f5395bd8043221e1aaba09042d3585242e.tar.xz
Warn rather than error for bad VDB USE files
-rw-r--r--paludis/repositories/gentoo/vdb_repository.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/paludis/repositories/gentoo/vdb_repository.cc b/paludis/repositories/gentoo/vdb_repository.cc
index 74bd3cf..e79aa16 100644
--- a/paludis/repositories/gentoo/vdb_repository.cc
+++ b/paludis/repositories/gentoo/vdb_repository.cc
@@ -499,6 +499,7 @@ namespace paludis
RepositoryName(repo)));
}
+ try
{
Context local_context("When loading key 'USE':");
std::string raw_use(file_contents(location, p->name, p->version, "USE"));
@@ -507,6 +508,12 @@ namespace paludis
filter_inserter(create_inserter<UseFlagName>(
std::inserter(p->use, p->use.begin())), IsPositiveFlag()));
}
+ catch (const Exception & e)
+ {
+ Log::get_instance()->message(ll_warning, lc_context) << "Error loading USE from VDB "
+ "entry '" << p->name << "-" << p->version << "' at '" << location << "' due to exception '"
+ << e.message() << "' (" << e.what() << "), pretending USE is empty for this package";
+ }
}
}