aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-19 11:44:21 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-19 11:44:21 +0000
commit7d73417eb461c69f78577cffc4034ff837c70948 (patch)
treec72f702a9031729f29fe66039b3e7305448eed20
parent6e3e3cfcdcbae9abe74e741f36ce6937f732bf05 (diff)
downloadpaludis-7d73417eb461c69f78577cffc4034ff837c70948.tar.gz
paludis-7d73417eb461c69f78577cffc4034ff837c70948.tar.xz
Support for --no- for various switch args
-rw-r--r--NEWS3
-rw-r--r--doc/api/cplusplus/examples/example_command_line.cc4
-rw-r--r--paludis/args/Makefile.am1
-rw-r--r--paludis/args/args_TEST.cc36
-rw-r--r--paludis/args/args_handler.cc15
-rw-r--r--paludis/args/args_option.cc46
-rw-r--r--paludis/args/args_option.hh34
-rw-r--r--paludis/args/args_visitor.cc121
-rw-r--r--paludis/args/args_visitor.hh5
-rw-r--r--paludis/args/install_args_group.cc10
-rw-r--r--paludis/args/man.cc18
-rw-r--r--paludis/args/man.hh6
-rw-r--r--src/clients/accerso/command_line.cc8
-rw-r--r--src/clients/accerso/man_accerso.cc2
-rw-r--r--src/clients/adjutrix/command_line.cc28
-rw-r--r--src/clients/adjutrix/man_adjutrix.cc2
-rw-r--r--src/clients/contrarius/command_line.cc16
-rw-r--r--src/clients/contrarius/man_contrarius.cc2
-rw-r--r--src/clients/importare/command_line.cc12
-rw-r--r--src/clients/importare/man_importare.cc2
-rw-r--r--src/clients/inquisitio/command_line.cc24
-rw-r--r--src/clients/inquisitio/man_inquisitio.cc2
-rw-r--r--src/clients/instruo/command_line.cc8
-rw-r--r--src/clients/instruo/man_instruo.cc2
-rw-r--r--src/clients/paludis/command_line.cc90
-rw-r--r--src/clients/paludis/man_paludis.cc2
-rw-r--r--src/clients/qualudis/man_qualudis.cc2
-rw-r--r--src/clients/qualudis/qualudis_command_line.cc6
-rw-r--r--src/clients/reconcilio/command_line.cc14
-rw-r--r--src/clients/reconcilio/man_reconcilio.cc2
30 files changed, 331 insertions, 192 deletions
diff --git a/NEWS b/NEWS
index f94f187..6b033e3 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ News for Paludis
This file lists the major changes between versions. For a more detailed list
of every change, see the ChangeLog.
+trunk/:
+ * Various switches now support --no-, for negation.
+
0.26.0_alpha4:
* STILL BROKEN, wait for 0.26.0 if you use these: CRAN, Ruby bindings for
dep specs.
diff --git a/doc/api/cplusplus/examples/example_command_line.cc b/doc/api/cplusplus/examples/example_command_line.cc
index 08ef3d5..ad8b8cd 100644
--- a/doc/api/cplusplus/examples/example_command_line.cc
+++ b/doc/api/cplusplus/examples/example_command_line.cc
@@ -24,8 +24,8 @@ CommandLine::CommandLine() :
action_args(this, "Actions",
"Selects which basic action to perform. At most one action should "
"be specified."),
- a_version(&action_args, "version", 'V', "Display program version"),
- a_help(&action_args, "help", 'h', "Display program help"),
+ a_version(&action_args, "version", 'V', "Display program version", false),
+ a_help(&action_args, "help", 'h', "Display program help", false),
general_args(this, "General options",
"Options which are relevant for most or all actions."),
diff --git a/paludis/args/Makefile.am b/paludis/args/Makefile.am
index b0b4df7..10bb8e1 100644
--- a/paludis/args/Makefile.am
+++ b/paludis/args/Makefile.am
@@ -62,6 +62,7 @@ noinst_LIBRARIES = libpaludisman.a
check_PROGRAMS = $(TESTS)
test_ldadd = \
+ $(top_builddir)/paludis/util/test_extras.o \
libpaludisargs.la \
$(top_builddir)/test/libtest.a \
$(top_builddir)/paludis/util/libpaludisutil.la
diff --git a/paludis/args/args_TEST.cc b/paludis/args/args_TEST.cc
index 13a75fb..7e0b022 100644
--- a/paludis/args/args_TEST.cc
+++ b/paludis/args/args_TEST.cc
@@ -50,6 +50,7 @@ struct CommandLine : public ArgsHandler
AliasArg arg_other_monkey;
IntegerArg arg_somenum;
EnumArg arg_enum;
+ SwitchArg arg_spider;
ArgsGroup group_three;
EnumArg arg_other_enum;
@@ -76,19 +77,21 @@ struct CommandLine : public ArgsHandler
CommandLine::CommandLine() :
group_one(this, "Group one", "Description of group one"),
- arg_foo(&group_one, "foo", 'f', "Enable foo"),
- arg_bar(&group_one, "bar", 'b', "Enable bar"),
- arg_dummy(&group_one, "dummy", 'd', "Enable something else"),
- arg_removed(&group_one, "removed", 'r', "Removed"),
+ arg_foo(&group_one, "foo", 'f', "Enable foo", false),
+ arg_bar(&group_one, "bar", 'b', "Enable bar", false),
+ arg_dummy(&group_one, "dummy", 'd', "Enable something else", false),
+ arg_removed(&group_one, "removed", 'r', "Removed", false),
group_two(this, "Group two", "Description of group two"),
- arg_baz(&group_two, "baz", 'z', "Enable baz"),
+ arg_baz(&group_two, "baz", 'z', "Enable baz", false),
arg_other_baz(&arg_baz, "other-baz"),
- arg_something(&group_two, "something", 's', "Value of something"),
- arg_monkey(&group_two, "monkey", 'm', "A monkey?"),
+ arg_something(&group_two, "something", 's', "Value of something", false),
+ arg_monkey(&group_two, "monkey", 'm', "A monkey?", false),
arg_other_monkey(&arg_monkey, "other-monkey"),
arg_somenum(&group_two, "num", 'n', "Some number"),
- arg_enum(&group_two, "enum", 'e', "One of three", EnumArg::EnumArgOptions("one", "Option one")("two", "option two")("three", "option three"), "two"),
+ arg_enum(&group_two, "enum", 'e', "One of three",
+ EnumArg::EnumArgOptions("one", "Option one")("two", "option two")("three", "option three"), "two"),
+ arg_spider(&group_two, "spider", '\0', "A spider?", true),
group_three(this, "Group three", "Description of group three"),
arg_other_enum(&group_three, "something", '\0', "Blah.", EnumArg::EnumArgOptions("a", "A")("b", "B")("c", "C"), "b"),
@@ -114,10 +117,10 @@ namespace test_cases
void run()
{
- const char * args[] = { "program-name", "--other-monkey", "chimp", "--other-baz",
+ const char * args[] = { "program-name", "--other-monkey", "chimp", "--other-baz", "--spider", "--no-spider",
"-fsne", "blah", "7", "three", "--", "--dummy", "one", "two" };
CommandLine c1;
- c1.run(12, args, "", "", "");
+ c1.run(14, args, "", "", "");
TEST_CHECK(c1.arg_foo.specified());
TEST_CHECK(! c1.arg_bar.specified());
TEST_CHECK(c1.arg_baz.specified());
@@ -133,6 +136,7 @@ namespace test_cases
TEST_CHECK(c1.arg_other_enum.argument() == "b");
TEST_CHECK(c1.arg_monkey.specified());
TEST_CHECK(c1.arg_monkey.argument() == "chimp");
+ TEST_CHECK(! c1.arg_spider.specified());
TEST_CHECK_EQUAL(std::distance(c1.begin_parameters(), c1.end_parameters()), 3);
TEST_CHECK_EQUAL(*c1.begin_parameters(), "--dummy");
@@ -157,6 +161,18 @@ namespace test_cases
}
} test_args_no_param;
+ struct ArgsTestNoNo : TestCase
+ {
+ ArgsTestNoNo() : TestCase("No --no-") { }
+
+ void run()
+ {
+ const char *args[] = { "program-name", "--no-num" };
+ CommandLine c1;
+ TEST_CHECK_THROWS(c1.run(2, args, "", "", ""), BadArgument);
+ }
+ } test_args_no_no;
+
/**
* \test Removed arguments tests.
*
diff --git a/paludis/args/args_handler.cc b/paludis/args/args_handler.cc
index 9bbc018..e75c94f 100644
--- a/paludis/args/args_handler.cc
+++ b/paludis/args/args_handler.cc
@@ -141,6 +141,7 @@ ArgsHandler::run(const int argc, const char * const * const argv,
for ( ; argit != arge; ++argit )
{
std::string arg = *argit;
+ visitor.set_no(false);
if (arg == "--")
{
@@ -152,8 +153,18 @@ ArgsHandler::run(const int argc, const char * const * const argv,
arg.erase(0, 2);
std::map<std::string, ArgsOption *>::iterator it = _imp->longopts.find(arg);
if (it == _imp->longopts.end())
- throw BadArgument("--" + arg);
- it->second->accept(visitor);
+ {
+ if (0 != arg.compare(0, 3, "no-"))
+ throw BadArgument("--" + arg);
+ arg.erase(0, 3);
+ it = _imp->longopts.find(arg);
+ if (it == _imp->longopts.end())
+ throw BadArgument("--no-" + arg);
+ visitor.set_no(true);
+ it->second->accept(visitor);
+ }
+ else
+ it->second->accept(visitor);
}
else if (arg[0] == '-')
{
diff --git a/paludis/args/args_option.cc b/paludis/args/args_option.cc
index 821cff4..4099a42 100644
--- a/paludis/args/args_option.cc
+++ b/paludis/args/args_option.cc
@@ -81,7 +81,15 @@ ArgsOption::remove()
SwitchArg::SwitchArg(ArgsGroup * const our_group, std::string our_long_name, char our_short_name,
std::string our_description) :
- ArgsOption(our_group, our_long_name, our_short_name, our_description)
+ ArgsOption(our_group, our_long_name, our_short_name, our_description),
+ _can_be_negated(false)
+{
+}
+
+SwitchArg::SwitchArg(ArgsGroup * const our_group, std::string our_long_name, char our_short_name,
+ std::string our_description, const bool c) :
+ ArgsOption(our_group, our_long_name, our_short_name, our_description),
+ _can_be_negated(c)
{
}
@@ -316,3 +324,39 @@ StringSetArg::end_allowed_args() const
return AllowedArgConstIterator(_imp->allowed_args.end());
}
+bool
+AliasArg::can_be_negated() const
+{
+ return _other->can_be_negated();
+}
+
+bool
+StringArg::can_be_negated() const
+{
+ return false;
+}
+
+bool
+IntegerArg::can_be_negated() const
+{
+ return false;
+}
+
+bool
+EnumArg::can_be_negated() const
+{
+ return false;
+}
+
+bool
+StringSetArg::can_be_negated() const
+{
+ return false;
+}
+
+bool
+SwitchArg::can_be_negated() const
+{
+ return _can_be_negated;
+}
+
diff --git a/paludis/args/args_option.hh b/paludis/args/args_option.hh
index e12bb92..04e9fca 100644
--- a/paludis/args/args_option.hh
+++ b/paludis/args/args_option.hh
@@ -129,6 +129,13 @@ namespace paludis
{
return _group;
}
+
+ /**
+ * Can we be negated?
+ *
+ * Needs to match up with ArgsVisitor logic.
+ */
+ virtual bool can_be_negated() const = 0;
};
/**
@@ -141,14 +148,29 @@ namespace paludis
public ArgsOption,
public AcceptInterfaceVisitsThis<ArgsVisitorTypes, SwitchArg>
{
+ private:
+ bool _can_be_negated;
+
public:
/**
* Constructor.
+ *
+ * \since 0.26
*/
SwitchArg(ArgsGroup * const group, std::string long_name, char short_name,
- std::string description);
+ std::string description, const bool can_be_negated);
+
+ /**
+ * Constructor.
+ *
+ * \deprecated Use the form with the additional can_be_negated arg. Deprecated in 0.26.
+ */
+ SwitchArg(ArgsGroup * const group, std::string long_name, char short_name,
+ std::string description) PALUDIS_ATTRIBUTE((deprecated));
~SwitchArg();
+
+ virtual bool can_be_negated() const;
};
/**
@@ -187,6 +209,8 @@ namespace paludis
* Set the argument returned by argument().
*/
void set_argument(const std::string& arg);
+
+ virtual bool can_be_negated() const;
};
/**
@@ -287,6 +311,8 @@ namespace paludis
AllowedArgConstIterator end_allowed_args() const;
///\}
+
+ virtual bool can_be_negated() const;
};
@@ -325,6 +351,8 @@ namespace paludis
{
return _other;
}
+
+ virtual bool can_be_negated() const;
};
/**
@@ -354,6 +382,8 @@ namespace paludis
* Set the argument returned by argument().
*/
void set_argument(const int arg) { _argument = arg; }
+
+ virtual bool can_be_negated() const;
};
/**
@@ -450,6 +480,8 @@ namespace paludis
AllowedArgConstIterator end_allowed_args() const;
///\}
+
+ virtual bool can_be_negated() const;
};
}
}
diff --git a/paludis/args/args_visitor.cc b/paludis/args/args_visitor.cc
index 4241000..b4af7ce 100644
--- a/paludis/args/args_visitor.cc
+++ b/paludis/args/args_visitor.cc
@@ -18,6 +18,7 @@
#include "args_option.hh"
#include "args_error.hh"
+#include "bad_argument.hh"
#include <paludis/util/visitor.hh>
#include <paludis/util/visitor-impl.hh>
@@ -63,7 +64,8 @@ ArgsVisitor::ArgsVisitor(ArgsIterator * ai, ArgsIterator ae,
const std::string & env_prefix) :
_args_index(ai),
_args_end(ae),
- _env_prefix(env_prefix)
+ _env_prefix(env_prefix),
+ _no(false)
{
}
@@ -78,16 +80,16 @@ ArgsVisitor::get_param(const ArgsOption & arg)
void ArgsVisitor::visit(StringArg & arg)
{
- arg.set_specified(true);
-
- if (! _env_prefix.empty())
- setenv(env_name(arg.long_name()).c_str(), "1", 1);
-
- std::string p(get_param(arg));
- arg.set_argument(p);
-
- if (! _env_prefix.empty())
- setenv(env_name(arg.long_name()).c_str(), p.c_str(), 1);
+ if (! _no)
+ {
+ std::string p(get_param(arg));
+ arg.set_specified(true);
+ arg.set_argument(p);
+ if (! _env_prefix.empty())
+ setenv(env_name(arg.long_name()).c_str(), p.c_str(), 1);
+ }
+ else
+ throw BadArgument("--no-" + arg.long_name());
}
void ArgsVisitor::visit(AliasArg & arg)
@@ -97,61 +99,74 @@ void ArgsVisitor::visit(AliasArg & arg)
void ArgsVisitor::visit(SwitchArg & arg)
{
- arg.set_specified(true);
-
- if (! _env_prefix.empty())
- setenv(env_name(arg.long_name()).c_str(), "1", 1);
+ if (! _no)
+ {
+ arg.set_specified(true);
+ if (! _env_prefix.empty())
+ setenv(env_name(arg.long_name()).c_str(), "1", 1);
+ }
+ else if (! arg.can_be_negated())
+ throw BadArgument("--no-" + arg.long_name());
+ else
+ {
+ arg.set_specified(false);
+ if (! _env_prefix.empty())
+ unsetenv(env_name(arg.long_name()).c_str());
+ }
}
void ArgsVisitor::visit(IntegerArg & arg)
{
- arg.set_specified(true);
-
- if (! _env_prefix.empty())
- setenv(env_name(arg.long_name()).c_str(), "1", 1);
-
- std::string param = get_param(arg);
- try
- {
- int a(destringify<int>(param));
- arg.set_argument(a);
-
- if (! _env_prefix.empty())
- setenv(env_name(arg.long_name()).c_str(), stringify(a).c_str(), 1);
- }
- catch (const DestringifyError &)
+ if (! _no)
{
- throw BadValue("--" + arg.long_name(), param);
+ arg.set_specified(true);
+ std::string param = get_param(arg);
+ try
+ {
+ int a(destringify<int>(param));
+ arg.set_argument(a);
+
+ if (! _env_prefix.empty())
+ setenv(env_name(arg.long_name()).c_str(), stringify(a).c_str(), 1);
+ }
+ catch (const DestringifyError &)
+ {
+ throw BadValue("--" + arg.long_name(), param);
+ }
}
+ else
+ throw BadArgument("--no-" + arg.long_name());
}
void ArgsVisitor::visit(EnumArg & arg)
{
- arg.set_specified(true);
-
- if (! _env_prefix.empty())
- setenv(env_name(arg.long_name()).c_str(), "1", 1);
-
- std::string p(get_param(arg));
- arg.set_argument(p);
-
- if (! _env_prefix.empty())
- setenv(env_name(arg.long_name()).c_str(), p.c_str(), 1);
+ if (! _no)
+ {
+ arg.set_specified(true);
+ std::string p(get_param(arg));
+ arg.set_argument(p);
+ if (! _env_prefix.empty())
+ setenv(env_name(arg.long_name()).c_str(), p.c_str(), 1);
+ }
+ else
+ throw BadArgument("--no-" + arg.long_name());
}
void ArgsVisitor::visit(StringSetArg & arg)
{
- arg.set_specified(true);
-
- if (! _env_prefix.empty())
- setenv(env_name(arg.long_name()).c_str(), "1", 1);
+ if (! _no)
+ {
+ arg.set_specified(true);
- std::string param = get_param(arg);
- arg.add_argument(param);
+ std::string param = get_param(arg);
+ arg.add_argument(param);
- if (! _env_prefix.empty())
- setenv(env_name(arg.long_name()).c_str(), join(arg.begin_args(),
- arg.end_args(), " ").c_str(), 1);
+ if (! _env_prefix.empty())
+ setenv(env_name(arg.long_name()).c_str(), join(arg.begin_args(),
+ arg.end_args(), " ").c_str(), 1);
+ }
+ else
+ throw BadArgument("--no-" + arg.long_name());
}
std::string
@@ -162,3 +177,9 @@ ArgsVisitor::env_name(const std::string & long_name) const
return result;
}
+void
+ArgsVisitor::set_no(const bool n)
+{
+ _no = n;
+}
+
diff --git a/paludis/args/args_visitor.hh b/paludis/args/args_visitor.hh
index 8ce7157..1fcf70e 100644
--- a/paludis/args/args_visitor.hh
+++ b/paludis/args/args_visitor.hh
@@ -86,6 +86,8 @@ namespace paludis
std::string env_name(const std::string & long_name) const;
+ bool _no;
+
public:
/**
* Constructor
@@ -110,6 +112,9 @@ namespace paludis
/// Visit a StringSetArg.
void visit(StringSetArg &);
+
+ /// Change whether we're visiting a --no- option
+ void set_no(const bool);
};
}
}
diff --git a/paludis/args/install_args_group.cc b/paludis/args/install_args_group.cc
index 4147c41..59b346a 100644
--- a/paludis/args/install_args_group.cc
+++ b/paludis/args/install_args_group.cc
@@ -30,16 +30,16 @@ InstallArgsGroup::InstallArgsGroup(ArgsHandler * h, const std::string & our_name
const std::string & our_description) :
ArgsGroup(h, our_name, our_description),
- a_pretend(this, "pretend", 'p', "Pretend only"),
+ a_pretend(this, "pretend", 'p', "Pretend only", false),
a_destinations(this, "destinations", 'd', "Use specified destinations instead of defaults"),
- a_preserve_world(this, "preserve-world", '1', "Don't modify the world file"),
+ a_preserve_world(this, "preserve-world", '1', "Don't modify the world file", true),
a_add_to_world_spec(this, "add-to-world-spec", '\0',
"Use this spec, rather than all targets, for updating world (for resume commands)"),
- a_no_config_protection(this, "no-config-protection", '\0', "Disable config file protection (dangerous)"),
+ a_no_config_protection(this, "no-config-protection", '\0', "Disable config file protection (dangerous)", false),
a_debug_build(this, "debug-build", '\0'),
a_checks(this, "checks", '\0'),
- a_fetch(this, "fetch", 'f', "Only fetch sources; don't install anything"),
- a_no_safe_resume(this, "no-safe-resume", '\0', "Do not allow interrupted downloads to be resumed"),
+ a_fetch(this, "fetch", 'f', "Only fetch sources; don't install anything", false),
+ a_no_safe_resume(this, "no-safe-resume", '\0', "Do not allow interrupted downloads to be resumed", false),
a_show_reasons(this, "show-reasons", '\0', "Show why packages are being (un)installed",
args::EnumArg::EnumArgOptions
("none", "Don't show any information")
diff --git a/paludis/args/man.cc b/paludis/args/man.cc
index c71ccb3..2183333 100644
--- a/paludis/args/man.cc
+++ b/paludis/args/man.cc
@@ -118,7 +118,8 @@ paludis::args::generate_doc(DocWriter & dw, const ArgsHandler * const h)
for (paludis::args::ArgsGroup::ConstIterator b((*a)->begin()), b_end((*a)->end()) ;
b != b_end ; ++b)
{
- dw.arg_group_item((*b)->short_name(), (*b)->long_name(), (*b)->description());
+ dw.arg_group_item((*b)->short_name(), (*b)->long_name(),
+ (*b)->can_be_negated() ? "no-" + (*b)->long_name() : "", (*b)->description());
ExtraText t(dw);
(*b)->accept(t);
@@ -206,12 +207,14 @@ HtmlWriter::start_arg_group(const std::string & name, const std::string & descri
void
HtmlWriter::arg_group_item(const char & short_name, const std::string & long_name,
- const std::string & description)
+ const std::string & negated_long_name, const std::string & description)
{
_os << "<dt>";
if (short_name)
- _os << "-" << short_name << ", ";
- _os << "--" << long_name << "</dt>" << endl;
+ _os << "-" << short_name << ", " << "--" << long_name;
+ if (! negated_long_name.empty())
+ _os << ", " << "--" << negated_long_name;
+ _os << "</dt>" << endl;
_os << "<dd>" << description << endl;
}
@@ -374,13 +377,16 @@ ManWriter::start_arg_group(const std::string & name, const std::string & descrip
void
ManWriter::arg_group_item(const char & short_name, const std::string & long_name,
- const std::string & description)
+ const std::string & negated_long_name, const std::string & description)
{
_os << ".TP" << endl;
_os << ".B \"";
if (short_name)
_os << "\\-" << short_name << " , ";
- _os << "\\-\\-" << long_name << "\"" << endl;
+ _os << "\\-\\-" << long_name;
+ if (! negated_long_name.empty())
+ _os << " (\\-\\-" << negated_long_name << ")\"";
+ _os << endl;
_os << description << endl;
}
diff --git a/paludis/args/man.hh b/paludis/args/man.hh
index 7ee0101..527098c 100644
--- a/paludis/args/man.hh
+++ b/paludis/args/man.hh
@@ -62,7 +62,7 @@ namespace paludis
virtual void start_description(const std::string & description) = 0;
virtual void start_arg_group(const std::string & name, const std::string & description) = 0;
virtual void arg_group_item(const char & short_name, const std::string & long_name,
- const std::string & description) = 0;
+ const std::string & negated_long_name, const std::string & description) = 0;
virtual void start_extra_arg() = 0;
virtual void extra_arg_enum(const std::string & first, const std::string & second,
const std::string & default_arg) = 0;
@@ -118,7 +118,7 @@ namespace paludis
void start_description(const std::string & description);
void start_arg_group(const std::string & name, const std::string & description);
void arg_group_item(const char & short_name, const std::string & long_name,
- const std::string & description);
+ const std::string & negated_long_name, const std::string & description);
void start_extra_arg();
void extra_arg_enum(const std::string & first, const std::string & second,
const std::string & default_arg);
@@ -172,7 +172,7 @@ namespace paludis
void start_description(const std::string & description);
void start_arg_group(const std::string & name, const std::string & description);
void arg_group_item(const char & short_name, const std::string & long_name,
- const std::string & description);
+ const std::string & negated_long_name, const std::string & description);
void start_extra_arg();
void extra_arg_enum(const std::string & first, const std::string & second,
const std::string & default_arg);
diff --git a/src/clients/accerso/command_line.cc b/src/clients/accerso/command_line.cc
index 37d9b14..2272ee7 100644
--- a/src/clients/accerso/command_line.cc
+++ b/src/clients/accerso/command_line.cc
@@ -30,14 +30,14 @@ CommandLine::CommandLine() :
action_args(this, "Actions",
"Selects which basic action to perform. Exactly one action should "
"be specified."),
- a_fetch(&action_args, "fetch", 'f', "Fetch necessary distfiles"),
- a_version(&action_args, "version", 'V', "Display program version"),
- a_help(&action_args, "help", 'h', "Display program help"),
+ a_fetch(&action_args, "fetch", 'f', "Fetch necessary distfiles", false),
+ a_version(&action_args, "version", 'V', "Display program version", false),
+ a_help(&action_args, "help", 'h', "Display program help", false),
general_args(this, "General options",
"Options which are relevant for most or all actions."),
a_log_level(&general_args, "log-level", '\0'),
- a_no_colour(&general_args, "no-colour", '\0', "Do not use colour"),
+ a_no_colour(&general_args, "no-colour", '\0', "Do not use colour", false),
a_no_color(&a_no_colour, "no-color"),
a_repository_directory(&general_args, "repository-dir", 'D',
"Where to find the repository (default: current directory)"),
diff --git a/src/clients/accerso/man_accerso.cc b/src/clients/accerso/man_accerso.cc
index 43fa418..534c19b 100644
--- a/src/clients/accerso/man_accerso.cc
+++ b/src/clients/accerso/man_accerso.cc
@@ -36,7 +36,7 @@ namespace
ManCommandLine() :
group(this, "", ""),
- a_html(&group, "html", '\0', "")
+ a_html(&group, "html", '\0', "", false)
{
}
diff --git a/src/clients/adjutrix/command_line.cc b/src/clients/adjutrix/command_line.cc
index 503f4b9..b7f78ec 100644
--- a/src/clients/adjutrix/command_line.cc
+++ b/src/clients/adjutrix/command_line.cc
@@ -32,19 +32,19 @@ CommandLine::CommandLine() :
"be specified."),
a_find_stable_candidates(&tree_action_args,
- "find-stable-candidates", 's', "Search for stable package candidates"),
+ "find-stable-candidates", 's', "Search for stable package candidates", false),
a_find_dropped_keywords(&tree_action_args,
- "find-dropped-keywords", 'd', "Search for packages where keywords have been dropped"),
+ "find-dropped-keywords", 'd', "Search for packages where keywords have been dropped", false),
a_find_insecure_packages(&tree_action_args,
- "find-insecure-packages", 'i', "Search for packages marked as insecure by a GLSA"),
+ "find-insecure-packages", 'i', "Search for packages marked as insecure by a GLSA", false),
a_find_unused_packages(&tree_action_args,
- "find-unused-packages", 'U', "Search package versions that can probably safely be removed"),
+ "find-unused-packages", 'U', "Search package versions that can probably safely be removed", false),
a_keywords_graph(&tree_action_args,
- "keyword-graph", 'k', "Display keywords graphically"),
+ "keyword-graph", 'k', "Display keywords graphically", false),
a_reverse_deps(&tree_action_args,
- "reverse-deps", 'r', "Find all package that depend on a given dep spec"),
+ "reverse-deps", 'r', "Find all package that depend on a given dep spec", false),
a_what_needs_keywording(&tree_action_args,
- "what-needs-keywording", 'w', "Display what needs to be done to keyword a target"),
+ "what-needs-keywording", 'w', "Display what needs to be done to keyword a target", false),
profile_action_args(this, "Profile-Oriented Actions",
"Selects which basic profile-oriented action to perform. Exactly one action should "
@@ -52,30 +52,30 @@ CommandLine::CommandLine() :
a_display_default_system_resolution(&profile_action_args,
"display-default-system-resolution", 'S', "Display package names and versions that are included in "
- "the default resolution of the system set"),
+ "the default resolution of the system set", false),
downgrade_check_args(this, "Downgrade Check Actions",
"Selects which downgrade check related action to perform. Exactly one action should "
"be specified."),
a_build_downgrade_check_list(&downgrade_check_args,
- "build-downgrade-check-list", '\0', "Build the downgrade check lists"),
+ "build-downgrade-check-list", '\0', "Build the downgrade check lists", false),
a_downgrade_check(&downgrade_check_args,
- "downgrade-check", '\0', "Perform the dowgrade check"),
+ "downgrade-check", '\0', "Perform the dowgrade check", false),
general_action_args(this, "General Actions",
"Selects which basic general action to perform. Exactly one action should "
"be specified."),
a_version(&general_action_args,
- "version", 'V', "Display program version"),
+ "version", 'V', "Display program version", false),
a_help(&general_action_args,
- "help", 'h', "Display program help"),
+ "help", 'h', "Display program help", false),
general_args(this, "General options",
"Options which are relevant for most or all actions."),
a_log_level(&general_args, "log-level", '\0'),
- a_no_colour(&general_args, "no-colour", '\0', "Do not use colour"),
+ a_no_colour(&general_args, "no-colour", '\0', "Do not use colour", false),
a_no_color(&a_no_colour, "no-color"),
a_repository_directory(&general_args, "repository-dir", 'D',
@@ -95,7 +95,7 @@ CommandLine::CommandLine() :
a_profile(&profile_args, "profile", '\0',
"Display results for this profile path, rather than all profiles (may be specified multiple times)"),
a_unstable(&profile_args, "unstable", '\0',
- "Accept ~arch as well as arch"),
+ "Accept ~arch as well as arch", true),
configuration_options(this, "Configuration options",
"Options that control general configuration."),
diff --git a/src/clients/adjutrix/man_adjutrix.cc b/src/clients/adjutrix/man_adjutrix.cc
index 5916717..0619777 100644
--- a/src/clients/adjutrix/man_adjutrix.cc
+++ b/src/clients/adjutrix/man_adjutrix.cc
@@ -36,7 +36,7 @@ namespace
ManCommandLine() :
group(this, "", ""),
- a_html(&group, "html", '\0', "")
+ a_html(&group, "html", '\0', "", false)
{
}
diff --git a/src/clients/contrarius/command_line.cc b/src/clients/contrarius/command_line.cc
index 86c19b9..5032252 100644
--- a/src/clients/contrarius/command_line.cc
+++ b/src/clients/contrarius/command_line.cc
@@ -29,13 +29,13 @@ CommandLine::CommandLine() :
"Selects which basic action to perform. Up to one action should "
"be specified. If no action is specified, contrarius tries to create"
"a cross toolchain."),
- a_version(&action_args, "version", 'V', "Display program version"),
- a_help(&action_args, "help", 'h', "Display program help"),
+ a_version(&action_args, "version", 'V', "Display program version", false),
+ a_help(&action_args, "help", 'h', "Display program help", false),
build_args(this, "Building",
"Tweak toolchain creation."),
- a_fetch(&build_args, "fetch", 'f', "Only fetch sources; don't install anything"),
- a_pretend(&build_args, "pretend", 'p', "Pretend only"),
+ a_fetch(&build_args, "fetch", 'f', "Only fetch sources; don't install anything", false),
+ a_pretend(&build_args, "pretend", 'p', "Pretend only", true),
a_environment(&build_args, "environment", 'E', "Environment specification (class:suffix, both parts optional)"),
a_show_reasons(&build_args, "show-reasons", '\0', "Show why packages are being installed",
paludis::args::EnumArg::EnumArgOptions
@@ -52,8 +52,8 @@ CommandLine::CommandLine() :
"binutils"),
a_target(&build_args, "target", 't', "Build for specified CTARGET."),
a_headers(&build_args, "headers", 'H',
- "Add additional stage to install kernel- and libc-headers before gcc."),
- a_always_rebuild(&build_args, "always-rebuild", 'r', "Always rebuild already built stages."),
+ "Add additional stage to install kernel- and libc-headers before gcc.", true),
+ a_always_rebuild(&build_args, "always-rebuild", 'r', "Always rebuild already built stages.", true),
a_debug_build(&build_args, "debug-build", '\0', "What to do with debug information",
paludis::args::EnumArg::EnumArgOptions
@@ -64,9 +64,9 @@ CommandLine::CommandLine() :
output_options(this, "Options for output verbosity",
"Control how verbose contrarius is."),
- a_verbose(&output_options, "verbose", 'v', "Be verbose"),
+ a_verbose(&output_options, "verbose", 'v', "Be verbose", true),
a_log_level(&output_options, "log-level", 'L'),
- a_no_colour(&output_options, "no-colour", 'C', "Do not use colour"),
+ a_no_colour(&output_options, "no-colour", 'C', "Do not use colour", false),
a_no_color(&a_no_colour, "no-color"),
a_resume_command_template(&output_options, "resume-command-template", '\0', "Save the resume command to a file made using mkstemp(3)")
{
diff --git a/src/clients/contrarius/man_contrarius.cc b/src/clients/contrarius/man_contrarius.cc
index 73f45b4..f5210a3 100644
--- a/src/clients/contrarius/man_contrarius.cc
+++ b/src/clients/contrarius/man_contrarius.cc
@@ -37,7 +37,7 @@ namespace
ManCommandLine() :
group(this, "", ""),
- a_html(&group, "html", '\0', "")
+ a_html(&group, "html", '\0', "", false)
{
}
diff --git a/src/clients/importare/command_line.cc b/src/clients/importare/command_line.cc
index f604d4d..6143c37 100644
--- a/src/clients/importare/command_line.cc
+++ b/src/clients/importare/command_line.cc
@@ -30,17 +30,17 @@ CommandLine::CommandLine() :
action_args(this, "Actions",
"Selects which basic action to perform. Exactly one action should "
"be specified."),
- a_install(&action_args, "install", 'i', "Install one or more packages (default)"),
- a_version(&action_args, "version", 'V', "Display program version"),
- a_help(&action_args, "help", 'h', "Display program help"),
+ a_install(&action_args, "install", 'i', "Install one or more packages (default)", false),
+ a_version(&action_args, "version", 'V', "Display program version", false),
+ a_help(&action_args, "help", 'h', "Display program help", false),
general_args(this, "General options",
"Options which are relevant for most or all actions."),
a_log_level(&general_args, "log-level", '\0'),
- a_no_colour(&general_args, "no-colour", '\0', "Do not use colour"),
+ a_no_colour(&general_args, "no-colour", '\0', "Do not use colour", false),
a_no_color(&a_no_colour, "no-color"),
a_environment(&general_args, "environment", 'E', "Environment specification (class:suffix, both parts optional)"),
- a_compact(&general_args, "compact", '\0', "Display output using one line per entry"),
+ a_compact(&general_args, "compact", '\0', "Display output using one line per entry", true),
source_args(this, "Source options",
"Options affecting the source image"),
@@ -51,7 +51,7 @@ CommandLine::CommandLine() :
a_description(&metadata_args, "description", 'D', "Specify a package description"),
a_build_dependency(&metadata_args, "build-dependency", 'B', "Specify a build dependency"),
a_run_dependency(&metadata_args, "run-dependency", 'R', "Specify a run dependency"),
- a_preserve_metadata(&metadata_args, "preserve-metadata", 'P', "If replacing a package, copy its description and dependencies"),
+ a_preserve_metadata(&metadata_args, "preserve-metadata", 'P', "If replacing a package, copy its description and dependencies", true),
install_args(this, "Install options",
"Options which are relevant for --install"),
diff --git a/src/clients/importare/man_importare.cc b/src/clients/importare/man_importare.cc
index 43fa418..534c19b 100644
--- a/src/clients/importare/man_importare.cc
+++ b/src/clients/importare/man_importare.cc
@@ -36,7 +36,7 @@ namespace
ManCommandLine() :
group(this, "", ""),
- a_html(&group, "html", '\0', "")
+ a_html(&group, "html", '\0', "", false)
{
}
diff --git a/src/clients/inquisitio/command_line.cc b/src/clients/inquisitio/command_line.cc
index 5a3cd29..268d80a 100644
--- a/src/clients/inquisitio/command_line.cc
+++ b/src/clients/inquisitio/command_line.cc
@@ -31,14 +31,14 @@ CommandLine::CommandLine() :
action_args(this, "Actions",
"Selects which basic action to perform. Exactly one action should "
"be specified."),
- a_search(&action_args, "search", 's', "Search for a package"),
- a_version(&action_args, "version", 'V', "Display program version"),
- a_help(&action_args, "help", 'h', "Display program help"),
+ a_search(&action_args, "search", 's', "Search for a package", false),
+ a_version(&action_args, "version", 'V', "Display program version", false),
+ a_help(&action_args, "help", 'h', "Display program help", false),
general_args(this, "General options",
"Options that are relevant for most or all actions."),
a_log_level(&general_args, "log-level", '\0'),
- a_no_colour(&general_args, "no-colour", '\0', "Do not use colour"),
+ a_no_colour(&general_args, "no-colour", '\0', "Do not use colour", false),
a_no_color(&a_no_colour, "no-color"),
a_environment(&general_args, "environment", 'E', "Environment specification (class:suffix, both parts optional)"),
@@ -51,9 +51,9 @@ CommandLine::CommandLine() :
("pcre", "Regular expression match using pcre")
("exact", "Exact text match"),
"text"),
- a_flatten(&match_args, "flatten", 'f', "Flatten spec trees, rather than matching against individual items"),
- a_enabled_only(&match_args, "enabled-only", 'e', "When searching spec trees, only look in enabled subtrees"),
- a_not(&match_args, "not", 'n', "Select packages that do not match"),
+ a_flatten(&match_args, "flatten", 'f', "Flatten spec trees, rather than matching against individual items", true),
+ a_enabled_only(&match_args, "enabled-only", 'e', "When searching spec trees, only look in enabled subtrees", true),
+ a_not(&match_args, "not", 'n', "Select packages that do not match", true),
filter_args(this, "Filter options",
"Options that control whether or not a package is considered for matching."),
@@ -65,8 +65,8 @@ CommandLine::CommandLine() :
paludis::args::StringSetArg::StringSetArgOptions(), &paludis::CategoryNamePartValidator::validate),
a_package(&filter_args, "package", '\0', "Matches with this package name only",
paludis::args::StringSetArg::StringSetArgOptions(), &paludis::PackageNamePartValidator::validate),
- a_visible_only(&filter_args, "visible-only", 'v', "Only consider visible packages"),
- a_all_versions(&filter_args, "all-versions", 'a', "Check all versions, rather than only one (slower)"),
+ a_visible_only(&filter_args, "visible-only", 'v', "Only consider visible packages", true),
+ a_all_versions(&filter_args, "all-versions", 'a', "Check all versions, rather than only one (slower)", true),
a_kind(&filter_args, "kind", 'K', "Packages of this kind only",
paludis::args::EnumArg::EnumArgOptions
("installable", "Installable packages")
@@ -77,9 +77,9 @@ CommandLine::CommandLine() :
output_args(this, "Output options",
"Options that control how output is generated."),
- a_compact(&output_args, "compact", '\0', "Display output using one line per entry"),
- a_show_dependencies(&output_args, "show-dependencies", 'D', "Show dependencies"),
- a_show_metadata(&output_args, "show-metadata", 'M', "Show raw metadata"),
+ a_compact(&output_args, "compact", '\0', "Display output using one line per entry", true),
+ a_show_dependencies(&output_args, "show-dependencies", 'D', "Show dependencies", true),
+ a_show_metadata(&output_args, "show-metadata", 'M', "Show raw metadata", true),
deprecated_args(this, "Deprecated options", "Deprecated options."),
a_config_suffix(&deprecated_args, "config-suffix", 'c',
diff --git a/src/clients/inquisitio/man_inquisitio.cc b/src/clients/inquisitio/man_inquisitio.cc
index 5916717..0619777 100644
--- a/src/clients/inquisitio/man_inquisitio.cc
+++ b/src/clients/inquisitio/man_inquisitio.cc
@@ -36,7 +36,7 @@ namespace
ManCommandLine() :
group(this, "", ""),
- a_html(&group, "html", '\0', "")
+ a_html(&group, "html", '\0', "", false)
{
}
diff --git a/src/clients/instruo/command_line.cc b/src/clients/instruo/command_line.cc
index b40561d..2771b40 100644
--- a/src/clients/instruo/command_line.cc
+++ b/src/clients/instruo/command_line.cc
@@ -30,14 +30,14 @@ CommandLine::CommandLine() :
action_args(this, "Actions",
"Selects which basic action to perform. Exactly one action should "
"be specified."),
- a_generate_cache(&action_args, "generate-cache", 'g', "Generate cache"),
- a_version(&action_args, "version", 'V', "Display program version"),
- a_help(&action_args, "help", 'h', "Display program help"),
+ a_generate_cache(&action_args, "generate-cache", 'g', "Generate cache", false),
+ a_version(&action_args, "version", 'V', "Display program version", false),
+ a_help(&action_args, "help", 'h', "Display program help", false),
general_args(this, "General options",
"Options which are relevant for most or all actions."),
a_log_level(&general_args, "log-level", '\0'),
- a_no_colour(&general_args, "no-colour", '\0', "Do not use colour"),
+ a_no_colour(&general_args, "no-colour", '\0', "Do not use colour", false),
a_no_color(&a_no_colour, "no-color"),
a_repository_directory(&general_args, "repository-dir", 'D',
"Where to find the repository (default: current directory)"),
diff --git a/src/clients/instruo/man_instruo.cc b/src/clients/instruo/man_instruo.cc
index cfd0895..0ca7ed9 100644
--- a/src/clients/instruo/man_instruo.cc
+++ b/src/clients/instruo/man_instruo.cc
@@ -36,7 +36,7 @@ namespace
ManCommandLine() :
group(this, "", ""),
- a_html(&group, "html", '\0', "")
+ a_html(&group, "html", '\0', "", false)
{
}
diff --git a/src/clients/paludis/command_line.cc b/src/clients/paludis/command_line.cc
index 6da71be..68dbd7d 100644
--- a/src/clients/paludis/command_line.cc
+++ b/src/clients/paludis/command_line.cc
@@ -30,61 +30,61 @@ CommandLine::CommandLine() :
action_args(this, "Actions",
"Selects which basic action to perform. Exactly one action should "
"be specified."),
- a_query(&action_args, "query", 'q', "Query for package information"),
- a_install(&action_args, "install", 'i', "Install one or more packages"),
- a_uninstall(&action_args, "uninstall", 'u', "Uninstall one or more packages"),
- a_uninstall_unused(&action_args, "uninstall-unused", '\0', "Uninstall unused packages"),
- a_sync(&action_args, "sync", 's', "Sync all or specified repositories"),
- a_report(&action_args, "report", 'r', "Report the current state of the system"),
- a_contents(&action_args, "contents", 'k', "Display contents of a package"),
- a_owner(&action_args, "owner", 'o', "Display the owner of a file"),
- a_config(&action_args, "config", '\0', "Run post-install configuration for a package"),
- a_version(&action_args, "version", 'V', "Display program version"),
- a_info(&action_args, "info", 'I', "Display program version and system information"),
- a_help(&action_args, "help", 'h', "Display program help"),
+ a_query(&action_args, "query", 'q', "Query for package information", false),
+ a_install(&action_args, "install", 'i', "Install one or more packages", false),
+ a_uninstall(&action_args, "uninstall", 'u', "Uninstall one or more packages", false),
+ a_uninstall_unused(&action_args, "uninstall-unused", '\0', "Uninstall unused packages", false),
+ a_sync(&action_args, "sync", 's', "Sync all or specified repositories", false),
+ a_report(&action_args, "report", 'r', "Report the current state of the system", false),
+ a_contents(&action_args, "contents", 'k', "Display contents of a package", false),
+ a_owner(&action_args, "owner", 'o', "Display the owner of a file", false),
+ a_config(&action_args, "config", '\0', "Run post-install configuration for a package", false),
+ a_version(&action_args, "version", 'V', "Display program version", false),
+ a_info(&action_args, "info", 'I', "Display program version and system information", false),
+ a_help(&action_args, "help", 'h', "Display program help", false),
action_args_internal(this, "More actions",
"Additional actions, mostly for script and internal use."),
- a_has_version(&action_args_internal, "has-version", '\0', "Check whether the specified spec is installed"),
- a_best_version(&action_args_internal, "best-version", '\0', "Display the best version of the specified spec"),
- a_match(&action_args_internal, "match", '\0', "Display all installed packages matching the supplied argument"),
+ a_has_version(&action_args_internal, "has-version", '\0', "Check whether the specified spec is installed", false),
+ a_best_version(&action_args_internal, "best-version", '\0', "Display the best version of the specified spec", false),
+ a_match(&action_args_internal, "match", '\0', "Display all installed packages matching the supplied argument", false),
a_environment_variable(&action_args_internal, "environment-variable", '\0', "Display the value of an environment "
- "variable for a particular package"),
+ "variable for a particular package", false),
a_configuration_variable(&action_args_internal, "configuration-variable", '\0', "Display the value of a "
- "configuration variable for a particular repository"),
- a_list_repositories(&action_args_internal, "list-repositories", '\0', "List available repositories"),
- a_list_categories(&action_args_internal, "list-categories", '\0', "List available categories"),
- a_list_packages(&action_args_internal, "list-packages", '\0', "List available packages"),
- a_list_sets(&action_args_internal, "list-sets", '\0', "List available package sets"),
- a_list_sync_protocols(&action_args_internal, "list-sync-protocols", '\0', "List available sync protocols"),
+ "configuration variable for a particular repository", false),
+ a_list_repositories(&action_args_internal, "list-repositories", '\0', "List available repositories", false),
+ a_list_categories(&action_args_internal, "list-categories", '\0', "List available categories", false),
+ a_list_packages(&action_args_internal, "list-packages", '\0', "List available packages", false),
+ a_list_sets(&action_args_internal, "list-sets", '\0', "List available package sets", false),
+ a_list_sync_protocols(&action_args_internal, "list-sync-protocols", '\0', "List available sync protocols", false),
a_list_repository_formats(&action_args_internal, "list-repository-formats", '\0',
- "List available repository formats"),
- a_list_dep_tag_categories(&action_args_internal, "list-dep-tag-categories", '\0', "List known dep tag categories"),
+ "List available repository formats", false),
+ a_list_dep_tag_categories(&action_args_internal, "list-dep-tag-categories", '\0', "List known dep tag categories", false),
a_regenerate_installed_cache(&action_args_internal, "regenerate-installed-cache", '\0',
- "Regenerate (non-metadata) cache for installed repositories"),
+ "Regenerate (non-metadata) cache for installed repositories", false),
a_regenerate_installable_cache(&action_args_internal, "regenerate-installable-cache", '\0',
- "Regenerate (non-metadata) cache for installable repositories"),
+ "Regenerate (non-metadata) cache for installable repositories", false),
general_args(this, "General options",
"Options which are relevant for most or all actions."),
a_log_level(&general_args, "log-level", '\0'),
- a_no_colour(&general_args, "no-colour", '\0', "Do not use colour"),
+ a_no_colour(&general_args, "no-colour", '\0', "Do not use colour", false),
a_no_color(&a_no_colour, "no-color"),
a_environment(&general_args, "environment", 'E', "Environment specification (class:suffix, both parts optional)"),
a_resume_command_template(&general_args, "resume-command-template", '\0',
"Save the resume command to a file. If the filename contains 'XXXXXX', use mkstemp(3) to generate the filename"),
#ifdef PALUDIS_ENABLE_THREADS
- a_multitask(&general_args, "multitask", '\0', "Perform tasks in parallel, where supported (currently --sync only)"),
+ a_multitask(&general_args, "multitask", '\0', "Perform tasks in parallel, where supported (currently --sync only)", true),
#else
a_multitask(&general_args, "multitask", '\0', "Does nothing. (For compatibility with Paludis when built with thread "
- "support, which you shouldn't be using yet.)"),
+ "support, which you shouldn't be using yet.)", true),
#endif
- a_compact(&general_args, "compact", '\0', "Display output using one line per entry (--install, --query)"),
+ a_compact(&general_args, "compact", '\0', "Display output using one line per entry (--install, --query)", true),
query_args(this, "Query options",
"Options which are relevant for --query."),
- a_show_deps(&query_args, "show-deps", 'D', "Show dependencies"),
- a_show_metadata(&query_args, "show-metadata", 'M', "Show raw metadata"),
+ a_show_deps(&query_args, "show-deps", 'D', "Show dependencies", true),
+ a_show_metadata(&query_args, "show-metadata", 'M', "Show raw metadata", true),
install_args(this, "Install, Uninstall options",
"Options which are relevant for --install, --uninstall or --uninstall-unused."),
@@ -92,13 +92,13 @@ CommandLine::CommandLine() :
uninstall_args(this, "Uninstall options",
"Options which are relevant for --uninstall."),
a_with_unused_dependencies(&uninstall_args, "with-unused-dependencies", '\0',
- "Also uninstall any dependencies of the target that are no longer used"),
+ "Also uninstall any dependencies of the target that are no longer used", true),
a_with_dependencies(&uninstall_args, "with-dependencies", '\0',
- "Also uninstall packages that depend upon the target"),
+ "Also uninstall packages that depend upon the target", true),
a_all_versions(&uninstall_args, "all-versions", '\0',
- "Uninstall all versions of a package"),
+ "Uninstall all versions of a package", true),
a_permit_unsafe_uninstalls(&uninstall_args, "permit-unsafe-uninstalls", '\0',
- "Allow depended-upon packages to uninstalled"),
+ "Allow depended-upon packages to uninstalled", true),
dl_args(this),
@@ -116,25 +116,25 @@ CommandLine::CommandLine() :
owner_args(this, "Owner options",
"Options relevant for the --owner actions."),
- a_full_match(&owner_args, "full-match", '\0', "Match whole filename"),
+ a_full_match(&owner_args, "full-match", '\0', "Match whole filename", true),
deprecated_args(this, "Deprecated options", "Deprecated options."),
a_dl_no_unnecessary_upgrades(&deprecated_args, "dl-no-unnecessary-upgrades", 'U',
- "Replaced by --dl-upgrade as-needed"),
+ "Replaced by --dl-upgrade as-needed", false),
a_dl_drop_all(&deprecated_args, "dl-drop-all", '0',
- "Replaced by --dl-deps-default discard"),
+ "Replaced by --dl-deps-default discard", false),
a_dl_ignore_installed(&deprecated_args, "dl-ignore-installed", 'e',
- "Replaced by --dl-reinstall always"),
+ "Replaced by --dl-reinstall always", false),
a_show_install_reasons(&deprecated_args, "show-install-reasons",
- '\0', "Replaced by --show-reasons"),
+ '\0', "Replaced by --show-reasons", false),
a_add_to_world_atom(&deprecated_args, "add-to-world-atom", '\0',
- "Replaced by --add-to-world-spec"),
+ "Replaced by --add-to-world-spec", false),
a_config_suffix(&deprecated_args, "config-suffix", 'c',
- "Replaced by --environment"),
+ "Replaced by --environment", false),
a_update_news(&deprecated_args, "update-news", '\0',
- "No longer useful, does nothing"),
+ "No longer useful, does nothing", false),
a_safe_resume(&deprecated_args, "safe-resume", '\0',
- "Now default behaviour, use --no-safe-resume to disable")
+ "Now default behaviour, use --no-safe-resume to disable", false)
{
add_usage_line("--query [query options] target ...");
add_usage_line("--install [install options] target ...");
diff --git a/src/clients/paludis/man_paludis.cc b/src/clients/paludis/man_paludis.cc
index 43fa418..534c19b 100644
--- a/src/clients/paludis/man_paludis.cc
+++ b/src/clients/paludis/man_paludis.cc
@@ -36,7 +36,7 @@ namespace
ManCommandLine() :
group(this, "", ""),
- a_html(&group, "html", '\0', "")
+ a_html(&group, "html", '\0', "", false)
{
}
diff --git a/src/clients/qualudis/man_qualudis.cc b/src/clients/qualudis/man_qualudis.cc
index 4ca41b1..a10ec9b 100644
--- a/src/clients/qualudis/man_qualudis.cc
+++ b/src/clients/qualudis/man_qualudis.cc
@@ -36,7 +36,7 @@ namespace
ManCommandLine() :
group(this, "", ""),
- a_html(&group, "html", '\0', "")
+ a_html(&group, "html", '\0', "", false)
{
}
diff --git a/src/clients/qualudis/qualudis_command_line.cc b/src/clients/qualudis/qualudis_command_line.cc
index 0307fb2..c75bc16 100644
--- a/src/clients/qualudis/qualudis_command_line.cc
+++ b/src/clients/qualudis/qualudis_command_line.cc
@@ -30,8 +30,8 @@ QualudisCommandLine::QualudisCommandLine() :
"be specified. If no action is specified, the directories specifed "
"on the command line (or, if none, the current directory) are "
"checked."),
- a_version(&action_args, "version", 'V', "Display program version"),
- a_help(&action_args, "help", 'h', "Display program help"),
+ a_version(&action_args, "version", 'V', "Display program version", false),
+ a_help(&action_args, "help", 'h', "Display program help", false),
check_options(this, "Options for general checks",
"Options relevant for the --owner actions."),
@@ -55,7 +55,7 @@ QualudisCommandLine::QualudisCommandLine() :
a_master_repository_dir(&configuration_options, "master-repository-dir", '\0',
"Use the specified location for the master repository"),
a_use_repository_cache(&configuration_options, "use-repository-cache", '\0',
- "Use the repository's metadata cache, if available (faster, but may miss certain errors)")
+ "Use the repository's metadata cache, if available (faster, but may miss certain errors)", true)
{
add_usage_line("[ options ] [ directories ... ]");
add_environment_variable("QUALUDIS_OPTIONS", "Default command-line options.");
diff --git a/src/clients/reconcilio/command_line.cc b/src/clients/reconcilio/command_line.cc
index 748b27d..93d380f 100644
--- a/src/clients/reconcilio/command_line.cc
+++ b/src/clients/reconcilio/command_line.cc
@@ -31,21 +31,21 @@ CommandLine::CommandLine() :
action_args(this, "Actions",
"Selects which basic action to perform. At most one action should "
"be specified."),
- a_fix_linkage(&action_args, "fix-linkage", '\0', "Search for and rebuild packages linked against non-existant libraries (default)"),
- a_version(&action_args, "version", 'V', "Display program version"),
- a_help(&action_args, "help", 'h', "Display program help"),
+ a_fix_linkage(&action_args, "fix-linkage", '\0', "Search for and rebuild packages linked against non-existant libraries (default)", false),
+ a_version(&action_args, "version", 'V', "Display program version", false),
+ a_help(&action_args, "help", 'h', "Display program help", false),
general_args(this, "General options",
"Options which are relevant for most or all actions."),
a_log_level(&general_args, "log-level", '\0'),
- a_no_colour(&general_args, "no-colour", '\0', "Do not use colour"),
+ a_no_colour(&general_args, "no-colour", '\0', "Do not use colour", false),
a_no_color(&a_no_colour, "no-color"),
a_environment(&general_args, "environment", 'E', "Environment specification (class:suffix, both parts optional)"),
- a_exact(&general_args, "exact", '\0', "Rebuild the same package version that is currently installed"),
- a_verbose(&general_args, "verbose", 'v', "Display more detailed output"),
+ a_exact(&general_args, "exact", '\0', "Rebuild the same package version that is currently installed", true),
+ a_verbose(&general_args, "verbose", 'v', "Display more detailed output", true),
a_resume_command_template(&general_args, "resume-command-template", '\0',
"Save the resume command to a file. If the filename contains 'XXXXXX', use mkstemp(3) to generate the filename"),
- a_compact(&general_args, "compact", '\0', "Display output using one line per entry"),
+ a_compact(&general_args, "compact", '\0', "Display output using one line per entry", true),
fix_linkage_args(this, "Fix Linkage options",
"Options which are relevant for --fix-linkage."),
diff --git a/src/clients/reconcilio/man_reconcilio.cc b/src/clients/reconcilio/man_reconcilio.cc
index 5916717..0619777 100644
--- a/src/clients/reconcilio/man_reconcilio.cc
+++ b/src/clients/reconcilio/man_reconcilio.cc
@@ -36,7 +36,7 @@ namespace
ManCommandLine() :
group(this, "", ""),
- a_html(&group, "html", '\0', "")
+ a_html(&group, "html", '\0', "", false)
{
}