aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-17 08:29:08 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-17 08:29:08 +0000
commit1b856504cc6e10cd93197e31ad623326396821e4 (patch)
tree272e490f122ceda4975f70e8bd49b7b0ca04e02f
parent8f2289d6ab26f6ef1720e750b7568f4443b1c696 (diff)
downloadpaludis-1b856504cc6e10cd93197e31ad623326396821e4.tar.gz
paludis-1b856504cc6e10cd93197e31ad623326396821e4.tar.xz
Warn for comments in parent files
-rw-r--r--paludis/repositories/gentoo/portage_repository_profile.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/paludis/repositories/gentoo/portage_repository_profile.cc b/paludis/repositories/gentoo/portage_repository_profile.cc
index 30d85f5..4717d8b 100644
--- a/paludis/repositories/gentoo/portage_repository_profile.cc
+++ b/paludis/repositories/gentoo/portage_repository_profile.cc
@@ -226,11 +226,20 @@ Implementation<PortageRepositoryProfile>::load_profile_parent(const FSEntry & di
LineConfigFile file(dir / "parent", LineConfigFileOptions() + lcfo_disallow_continuations + lcfo_disallow_comments);
LineConfigFile::Iterator i(file.begin()), i_end(file.end());
+ bool once(false);
if (i == i_end)
Log::get_instance()->message(ll_warning, lc_context, "parent file is empty");
else
for ( ; i != i_end ; ++i)
{
+ if ('#' == i->at(0))
+ {
+ if (! once)
+ Log::get_instance()->message(ll_qa, lc_context, "Comments not allowed in '" + stringify(dir / "parent") + "'");
+ once = true;
+ continue;
+ }
+
FSEntry parent_dir(dir);
do
{