aboutsummaryrefslogtreecommitdiff
path: root/src/adjutrix/display_profiles_use.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/adjutrix/display_profiles_use.cc')
-rw-r--r--src/adjutrix/display_profiles_use.cc23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/adjutrix/display_profiles_use.cc b/src/adjutrix/display_profiles_use.cc
index 80e0a50..cce7eac 100644
--- a/src/adjutrix/display_profiles_use.cc
+++ b/src/adjutrix/display_profiles_use.cc
@@ -153,25 +153,12 @@ void do_display_profiles_use(NoConfigEnvironment & env)
if (CommandLine::get_instance()->a_profile.args_begin() ==
CommandLine::get_instance()->a_profile.args_end())
{
- LineConfigFile profiles_desc(env.main_repository_dir() / "profiles" / "profiles.desc");
+ for (NoConfigEnvironment::ProfilesIterator p(env.begin_profiles()), p_end(env.end_profiles()) ;
+ p != p_end ; ++p)
{
- for (LineConfigFile::Iterator line(profiles_desc.begin()), line_end(profiles_desc.end()) ;
- line != line_end ; ++line)
- {
- std::vector<std::string> tokens;
- WhitespaceTokeniser::get_instance()->tokenise(*line, std::back_inserter(tokens));
-
- if (tokens.size() != 3)
- {
- Log::get_instance()->message(ll_warning, lc_context, "Skipping invalid line '"
- + *line + "'");
- continue;
- }
-
- env.set_profile(env.main_repository_dir() / "profiles" / tokens.at(1));
- display_profiles_use(env, tokens.at(0) + "." + tokens.at(2), env.main_repository_dir() /
- "profiles" / tokens.at(1), all_use_flags, all_use_expand_flags);
- }
+ env.set_profile(p);
+ display_profiles_use(env, p->arch + "." + p->status, p->path,
+ all_use_flags, all_use_expand_flags);
}
}
else