aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-27 16:04:15 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-27 16:04:15 +0100
commitb49bba1cd06bb42b67137878e558d5516f1bffe1 (patch)
treeb3ad89dc5b9524a48b2e8f54389cf21ad626931d
parente68ae481666d9c97d04e0ce1348d6461c2d83654 (diff)
downloadpaludis-b49bba1cd06bb42b67137878e558d5516f1bffe1.tar.gz
paludis-b49bba1cd06bb42b67137878e558d5516f1bffe1.tar.xz
--make for binary creation
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.cc31
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.hh6
-rw-r--r--src/clients/cave/resolve_common.cc7
3 files changed, 31 insertions, 13 deletions
diff --git a/src/clients/cave/cmd_resolve_cmdline.cc b/src/clients/cave/cmd_resolve_cmdline.cc
index f5b1805..2a2b301 100644
--- a/src/clients/cave/cmd_resolve_cmdline.cc
+++ b/src/clients/cave/cmd_resolve_cmdline.cc
@@ -219,16 +219,27 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A
"does not satisfy other constraints. Also note that specifying a preset will not force a package to be "
"considered if it would otherwise not be part of the resolution set."),
- g_destination_options(this, "Destination Options", "Control to which destinations packages are installed. "
- "If no options from this group are selected, install only to /. Otherwise, install to all of the "
- "specified destinations, and install to / as necessary to satisfy build dependencies."),
-// a_fetch(&g_destination_options, "fetch", 'f', "Only fetch packages, do not install anything", true),
- a_create_binaries_for_targets(&g_destination_options, "create-binaries-for-targets", 'b',
- "Rather than installing targets to /, instead create binary packages for targets, and install packages "
- "to / as necessary for dependencies.", true),
-// a_install_via_binary(&g_destination_options, "install-via-binary", 'B',
-// "If installing a package to / that matches the supplied spec, create a binary package and install that. May "
-// "be specified multiple times."),
+ g_destination_options(this, "Destination Options", "Control to which destinations targets are installed. Dependencies "
+ "will always be installed to / as necessary."),
+ a_make(&g_destination_options, "make", 'm', "Specify what to do with targets.",
+ args::EnumArg::EnumArgOptions
+ ("install", 'i', "Install targets to /")
+ ("binaries", 'b', "Create binary packages for targets"),
+ "install"),
+// a_make_dependencies(&g_destination_options, "make-dependencies", 'M', "Specify what to do with dependencies of "
+// "targets. Only useful when '--make' is not set to 'install', since dependencies on / are considered "
+// "specially.",
+// args::EnumArg::EnumArgOptions
+// ("auto", '\0', "Select appropriate behaviour based upon --make. For 'install', 'all', and "
+// "for 'binaries', 'runtime'.")
+// ("runtime", 'r', "Only care about runtime dependencies")
+// ("all", 'a', "Care about all dependencies")
+// ("none", 'n', "Don't care about dependencies at all"),
+// "auto"),
+// a_via_binary(&g_destination_options, "via-binary", 'b', "When building a package matching the supplied spec, "
+// "create a binary package and use that for the install. May be specified multiple times. If this option "
+// "is not specified, a package will be built multiple times for multiple destinations"),
+
// g_query_options(this, "Query Options", "Query the user interactively when making decisions. "
// "If only --query is specified, prompt for everything. Otherwise, prompt only for the specified decisions."),
diff --git a/src/clients/cave/cmd_resolve_cmdline.hh b/src/clients/cave/cmd_resolve_cmdline.hh
index c3e1178..1c57c13 100644
--- a/src/clients/cave/cmd_resolve_cmdline.hh
+++ b/src/clients/cave/cmd_resolve_cmdline.hh
@@ -91,8 +91,12 @@ namespace paludis
args::StringSetArg a_preset;
args::ArgsGroup g_destination_options;
+ args::EnumArg a_make;
+// args::EnumArg a_make_dependencies;
+// args::StringSetArg a_via_binary;
+
// args::SwitchArg a_fetch;
- args::SwitchArg a_create_binaries_for_targets;
+// args::SwitchArg a_create_binaries_for_targets;
// args::StringSetArg a_install_via_binary;
// args::StringSetArg a_no_binaries_for;
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index dfef5af..ae02e33 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -279,10 +279,13 @@ namespace
DestinationTypes visit(const TargetReason &) const
{
- if (resolution_options.a_create_binaries_for_targets.specified())
+ if (resolution_options.a_make.argument() == "binaries")
return DestinationTypes() + dt_create_binary;
- else
+ else if (resolution_options.a_make.argument() == "install")
return DestinationTypes() + dt_install_to_slash;
+ else
+ throw args::DoHelp("Don't understand argument '" + resolution_options.a_make.argument() + "' to '--"
+ + resolution_options.a_make.long_name() + "'");
}
DestinationTypes visit(const DependentReason &) const