aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-18 00:39:20 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-19 21:45:57 +0100
commit893eeb42facc1d8ac2fbcbb7730d20395ef6bba6 (patch)
treefb49ad177b0814b742e11dd6f2d25e0879a83381
parent99f4d0b5d3262844f1f4c9f1461d966a88e7b391 (diff)
downloadpaludis-893eeb42facc1d8ac2fbcbb7730d20395ef6bba6.tar.gz
paludis-893eeb42facc1d8ac2fbcbb7730d20395ef6bba6.tar.xz
more commandline
-rw-r--r--src/clients/cave/cmd_display_resolution.cc17
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.cc36
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.hh6
3 files changed, 37 insertions, 22 deletions
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index df84d1c..2a0b991 100644
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -451,7 +451,22 @@ namespace
}
if (id->short_description_key())
- cout << " \"" << id->short_description_key()->value() << "\"" << endl;
+ {
+ bool show(false);
+ if (cmdline.display_options.a_show_descriptions.argument() == "none")
+ show = false;
+ else if (cmdline.display_options.a_show_descriptions.argument() == "new")
+ show = is_new;
+ else if (cmdline.display_options.a_show_descriptions.argument() == "all")
+ show = true;
+ else
+ throw args::DoHelp("Don't understand argument '"
+ + cmdline.display_options.a_show_descriptions.argument() + "' to '--"
+ + cmdline.display_options.a_show_descriptions.long_name() + "'");
+
+ if (show)
+ cout << " \"" << id->short_description_key()->value() << "\"" << endl;
+ }
display_reasons(*c, false);
}
diff --git a/src/clients/cave/cmd_resolve_cmdline.cc b/src/clients/cave/cmd_resolve_cmdline.cc
index ebf10cc..f86b6bf 100644
--- a/src/clients/cave/cmd_resolve_cmdline.cc
+++ b/src/clients/cave/cmd_resolve_cmdline.cc
@@ -47,24 +47,6 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A
// a_purge_unused_packages(&g_cleanup_options, "purge-unused-packages", '\0',
// "Purge packages that are no longer used after an uninstall or clean", true),
//
-// g_display_options(this, "Display Options", "Options relating to the resolution display."),
-// a_show_option_descriptions(&g_display_options, "show-option-descriptions", '\0',
-// "Whether to display descriptions for package options",
-// args::EnumArg::EnumArgOptions
-// ("none", "Don't show any descriptions")
-// ("new", "Show for any new options")
-// ("changed", "Show for new or changed options")
-// ("all", "Show all options"),
-// "changed"
-// ),
-// a_show_descriptions(&g_display_options, "show-descriptions", '\0',
-// "Whether to display package descriptions",
-// args::EnumArg::EnumArgOptions
-// ("none", "Don't show any descriptions")
-// ("new", "Show for new packages")
-// ("all", "Show for all packages"),
-// "new"
-// ),
g_keep_options(this, "Reinstall Options", "Control whether installed packages are kept."),
a_keep_targets(&g_keep_options, "keep-targets", 'K',
@@ -197,6 +179,24 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A
ResolveCommandLineDisplayOptions::ResolveCommandLineDisplayOptions(args::ArgsHandler * const h) :
ArgsSection(h, "Display Options"),
+ g_display_options(this, "Display Options", "Options relating to the resolution display."),
+// a_show_option_descriptions(&g_display_options, "show-option-descriptions", '\0',
+// "Whether to display descriptions for package options",
+// args::EnumArg::EnumArgOptions
+// ("none", "Don't show any descriptions")
+// ("new", "Show for any new options")
+// ("changed", "Show for new or changed options")
+// ("all", "Show all options"),
+// "changed"
+// ),
+ a_show_descriptions(&g_display_options, "show-descriptions", '\0',
+ "Whether to display package descriptions",
+ args::EnumArg::EnumArgOptions
+ ("none", "Don't show any descriptions")
+ ("new", "Show for new packages")
+ ("all", "Show for all packages"),
+ "new"
+ ),
g_explanations(this, "Explanations", "Options requesting the resolver explain a particular decision "
"that it made"),
a_explain(&g_explanations, "explain", '\0', "Explain why the resolver made a particular decision. The "
diff --git a/src/clients/cave/cmd_resolve_cmdline.hh b/src/clients/cave/cmd_resolve_cmdline.hh
index f1147ee..be42ddf 100644
--- a/src/clients/cave/cmd_resolve_cmdline.hh
+++ b/src/clients/cave/cmd_resolve_cmdline.hh
@@ -123,9 +123,9 @@ namespace paludis
{
ResolveCommandLineDisplayOptions(args::ArgsHandler * const);
- // args::ArgsGroup g_display_options;
- // args::EnumArg a_show_option_descriptions;
- // args::EnumArg a_show_descriptions;
+ args::ArgsGroup g_display_options;
+// args::EnumArg a_show_option_descriptions;
+ args::EnumArg a_show_descriptions;
args::ArgsGroup g_explanations;
args::StringSetArg a_explain;