aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-12 21:59:07 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-12 21:59:07 +0000
commit106b6bbfa4d5cfbe3762eb584e42c0043dafa65d (patch)
tree01379afed2287a8d1df1aae25de69741e983c173
parent64da279afdf05b0f710f8f3f57ebe690d18c0706 (diff)
downloadpaludis-106b6bbfa4d5cfbe3762eb584e42c0043dafa65d.tar.gz
paludis-106b6bbfa4d5cfbe3762eb584e42c0043dafa65d.tar.xz
Don't be confused by multiple identical lines when handling -lines in profile files
-rw-r--r--paludis/repositories/portage/portage_repository_profile_file.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/paludis/repositories/portage/portage_repository_profile_file.cc b/paludis/repositories/portage/portage_repository_profile_file.cc
index 1301e0e..4f29c96 100644
--- a/paludis/repositories/portage/portage_repository_profile_file.cc
+++ b/paludis/repositories/portage/portage_repository_profile_file.cc
@@ -51,7 +51,11 @@ ProfileFile::add_file(const FSEntry & f)
if (_imp->lines.end() == i)
Log::get_instance()->message(ll_qa, lc_context, "No match for '" + *line + "'");
else
- _imp->lines.erase(i);
+ while (_imp->lines.end() != i)
+ {
+ _imp->lines.erase(i++);
+ i = std::find(i, _imp->lines.end(), line->substr(1));
+ }
}
else
_imp->lines.push_back(*line);