diff options
author | 2011-02-04 20:25:34 +0000 | |
---|---|---|
committer | 2011-02-04 20:25:34 +0000 | |
commit | 3caef7b22c4eaee861f0f655d5c1650652b7d2c6 (patch) | |
tree | 9b472d0447d1b824c574e594d9ee05e704a20ca1 | |
parent | 8e76744365a37d8cf9816764377cbdd26592e568 (diff) | |
download | paludis-3caef7b22c4eaee861f0f655d5c1650652b7d2c6.tar.gz paludis-3caef7b22c4eaee861f0f655d5c1650652b7d2c6.tar.xz |
Bye bye importare
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | bash-completion/Makefile.am | 2 | ||||
-rw-r--r-- | bash-completion/importare | 175 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | doc/clients/Makefile.am | 10 | ||||
-rw-r--r-- | doc/clients/index.html.part | 1 | ||||
-rw-r--r-- | doc/clients/toplinks.html.part.in | 4 | ||||
-rw-r--r-- | doc/faq/different.html.part | 2 | ||||
-rw-r--r-- | doc/index.html.part.in | 1 | ||||
-rw-r--r-- | src/clients/cave/resolve_cmdline.cc | 4 | ||||
-rw-r--r-- | src/clients/importare/Makefile.am | 49 | ||||
-rw-r--r-- | src/clients/importare/command_line.cc | 126 | ||||
-rw-r--r-- | src/clients/importare/command_line.hh | 73 | ||||
-rw-r--r-- | src/clients/importare/importare.cc | 278 | ||||
-rw-r--r-- | src/clients/importare/install.cc | 159 | ||||
-rw-r--r-- | src/clients/importare/install.hh | 31 | ||||
-rw-r--r-- | src/clients/importare/man_importare.cc | 79 | ||||
-rw-r--r-- | zsh-completion/Makefile.am | 2 | ||||
-rw-r--r-- | zsh-completion/_importare | 75 |
19 files changed, 11 insertions, 1072 deletions
diff --git a/.gitignore b/.gitignore index 233a340ef..2cc5fe738 100644 --- a/.gitignore +++ b/.gitignore @@ -137,7 +137,6 @@ paludis-*.*.*.tar.bz2 /doc/clients/contrarius.html /doc/clients/footer.html.part /doc/clients/header.html.part -/doc/clients/importare.html /doc/clients/index.html /doc/clients/instruo.html /doc/clients/paludis.html @@ -503,7 +502,6 @@ paludis-*.*.*.tar.bz2 /src/clients/adjutrix/adjutrix /src/clients/appareo/appareo /src/clients/cave/cave -/src/clients/importare/importare /src/clients/instruo/instruo /src/clients/paludis/paludis /src/clients/reconcilio/reconcilio diff --git a/bash-completion/Makefile.am b/bash-completion/Makefile.am index 58ef29c99..a7cb8606e 100644 --- a/bash-completion/Makefile.am +++ b/bash-completion/Makefile.am @@ -1,7 +1,7 @@ MAINTAINERCLEANFILES = Makefile.in noinst_DATA = paludis adjutrix \ accerso instruo reconcilio \ - importare cave + cave EXTRA_DIST = $(noinst_DATA) AUTOMAKE_OPTIONS = 1.11 parallel-tests diff --git a/bash-completion/importare b/bash-completion/importare deleted file mode 100644 index 350344a32..000000000 --- a/bash-completion/importare +++ /dev/null @@ -1,175 +0,0 @@ -# Bash completion function for importare -# vim: set et sw=4 sts=4 ts=4 ft=sh : - -# NOTE: This is still a work in progress, don't expect it to work well or -# properly right now. - -_importare() { - local cur prev opts action - - local action_opts general_opts source_opts - local install_opts deplist_opts all_opts - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - action_opts="--install -i \ - --version -V \ - --help -h" - general_opts="--log-level \ - --no-colour \ - --no-color \ - --environment -E \ - --compact \ - --no-compact" - source_opts="--location -l" - metadata_opts="--description -D \ - --build-dependency -B \ - --run-dependency -R \ - --preserve-metadata -P" - deplist_opts="--dl-reinstall \ - --dl-reinstall-scm \ - --dl-upgrade \ - --dl-new-slots \ - --dl-downgrade \ - --dl-deps-default \ - --dl-installed-deps-pre \ - --dl-installed-deps-runtime \ - --dl-installed-deps-post \ - --dl-uninstalled-deps-pre \ - --dl-uninstalled-deps-runtime \ - --dl-uninstalled-deps-post \ - --dl-uninstalled-deps-suggested \ - --dl-suggested \ - --dl-circular \ - --dl-blocks \ - --dl-override-masks \ - --dl-fall-back" - install_opts="--pretend -p \ - --destinations -d \ - --no-config-protection \ - --show-reasons \ - --show-use-descriptions \ - --show-package-descriptions \ - --continue-on-failure \ - --skip-phase \ - --abort-at-phase \ - --skip-until-phase \ - --change-phases-for \ - ${source_opts} \ - ${metadata_opts} \ - ${deplist_opts}" - - all_opts="${action_opts} ${general_opts} ${source_opts} ${metadata_opts} ${deplist_opts} ${install_opts} ${install_opts}" - - local x - for x in "${COMP_WORDS[@]}" ; do - case "${x}" in - --install|-i) - action="install" - break - ;; - --version|-V|--help|-h) - action="info" - break - ;; - esac - done - - case "${cur}" in - -*) - local opts= - [[ -z "${action}" ]] && action="all" - opts="${action}_opts" - - COMPREPLY=($(compgen -W "${general_opts} ${!opts}" -- "${cur}")) - return 0 - ;; - *) - case "${prev}" in - ## Enum operators - --log-level) - COMPREPLY=($(compgen -W "debug qa warning silent" -- "${cur}")) - return 0 - ;; - --show-reasons) - COMPREPLY=($(compgen -W "none summary full" -- "${cur}")) - return 0 - ;; - --show-use-descriptions) - COMPREPLY=($(compgen -W "none new changed all" -- "${cur}")) - return 0 - ;; - --show-package-descriptions) - COMPREPLY=($(compgen -W "none new all" -- "${cur}")) - return 0 - ;; - --continue-on-failure) - COMPREPLY=($(compgen -W "if-fetch-only never if-satisfied if-independent always" -- "${cur}")) - return 0 - ;; - --change-phases-for) - COMPREPLY=($(compgen -W "all first last" -- "${cur}")) - return 0 - ;; - - --location|-l) - _filedir -d - return 0 - ;; - - --dl-reinstall) - COMPREPLY=($(compgen -W "never always if-use-changed" -- "${cur}")) - return 0 - ;; - --dl-reinstall-scm) - COMPREPLY=($(compgen -W "never always daily weekly" -- "${cur}")) - return 0 - ;; - --dl-upgrade|--dl-new-slots) - COMPREPLY=($(compgen -W "always as-needed" -- "${cur}")) - return 0 - ;; - --dl-downgrade) - COMPREPLY=($(compgen -W "as-needed warning error" -- "${cur}")) - return 0 - ;; - --dl-deps-default|--dl-installed-deps-pre|--dl-installed-deps-runtime|--dl-installed-deps-post|--dl-uninstalled-deps-pre|--dl-uninstalled-deps-runtime|--dl-uninstalled-deps-post|--dl-uninstalled-deps-suggested) - COMPREPLY=($(compgen -W "pre pre-or-post post try-post discard" -- "${cur}")) - return 0 - ;; - - --dl-suggested) - COMPREPLY=($(compgen -W "show install discard" -- "${cur}")) - return 0 - ;; - --dl-circular) - COMPREPLY=($(compgen -W "error discard" -- "${cur}")) - return 0 - ;; - --dl-blocks) - COMPREPLY=($(compgen -W "accumulate error discard" -- "${cur}")) - return 0 - ;; - --dl-override-masks) - COMPREPLY=($(compgen -W "none tilde-keyword unkeyworded repository license" -- "${cur}")) - return 0 - ;; - --dl-fall-back) - COMPREPLY=($(compgen -W "as-needed-except-targets as-needed never" -- "${cur}")) - return 0 - ;; - *) - case "${action}" in - --install|-i) - return 0 - ;; - esac - ;; - esac - ;; - esac -} - -complete -o filenames -F _importare importare diff --git a/configure.ac b/configure.ac index 0559a35f2..51aeba0d6 100644 --- a/configure.ac +++ b/configure.ac @@ -1398,7 +1398,7 @@ AC_ARG_WITH([repositories], gemcutter Gemcutter for Ruby repository Automatic repository config generation (via 'unavailable') unavailable Unavailable - unpackaged Unpackaged (for importare) + unpackaged Unpackaged (for cave import) unwritten Unwritten virtuals Old style Gentoo virtuals], [repositories="`echo $with_repositories | tr ',' ' '`"], @@ -1513,24 +1513,23 @@ AC_DEFINE_UNQUOTED([DEFAULT_DISTRIBUTION], "$DEFAULT_DISTRIBUTION", [Default dis dnl }}} dnl {{{ clients -ALL_CLIENTS="accerso adjutrix appareo cave importare instruo paludis reconcilio" +ALL_CLIENTS="accerso adjutrix appareo cave instruo paludis reconcilio" ALL_CLIENTS_HTML="" for a in $ALL_CLIENTS ; do ALL_CLIENTS_HTML="$ALL_CLIENTS_HTML $a.html" done -DEFAULT_CLIENTS="adjutrix cave importare paludis reconcilio" +DEFAULT_CLIENTS="adjutrix cave paludis reconcilio" AC_MSG_CHECKING([which clients to build...]) AC_ARG_WITH([clients], [ --with-clients=foo,bar,... Build the specified clients: all All available clients - default Equivalent to adjutrix,cave,importare,paludis,reconcilio + default Equivalent to adjutrix,cave,paludis,reconcilio accerso A fetch / mirror client adjutrix A tool for tree querying appareo A tool for generating manifests cave The modular Paludis client - importare On-the-fly unpackaged installer instruo A metadata generation client paludis The Paludis console client reconcilio A linkage repair tool], @@ -1800,7 +1799,6 @@ AC_OUTPUT( src/clients/adjutrix/Makefile src/clients/appareo/Makefile src/clients/cave/Makefile - src/clients/importare/Makefile src/clients/instruo/Makefile src/clients/paludis/Makefile src/clients/reconcilio/Makefile diff --git a/doc/clients/Makefile.am b/doc/clients/Makefile.am index e33ab0439..d4b25423b 100644 --- a/doc/clients/Makefile.am +++ b/doc/clients/Makefile.am @@ -156,16 +156,6 @@ $(CAVE_COMMANDS_HTML) : header.html.part footer.html.part fi ; } && \ cat footer.html.part ; } > $@ -importare.html : header.html.part footer.html.part - { cat header.html.part && { \ - if test -x $(top_builddir)/src/clients/importare/man-importare ; then \ - $(top_builddir)/src/clients/importare/man-importare --html ; \ - else \ - echo "<h1>importare</h1>"; \ - echo "<p>Sorry, documentation was generated without support for the importare client.</p>" ; \ - fi ; } && \ - cat footer.html.part ; } > $@ - instruo.html : header.html.part footer.html.part { cat header.html.part && { \ if test -x $(top_builddir)/src/clients/instruo/man-instruo ; then \ diff --git a/doc/clients/index.html.part b/doc/clients/index.html.part index 8b4e80824..b79129f46 100644 --- a/doc/clients/index.html.part +++ b/doc/clients/index.html.part @@ -13,7 +13,6 @@ <ul> <li><a href="paludis.html">paludis</a>, the original console package management client.</li> - <li><a href="importare.html">importare</a>, the unpackaged package installer.</li> <li><a href="reconcilio.html">reconcilio</a>, a tool for rebuilding packages with broken linkage.</li> </ul> diff --git a/doc/clients/toplinks.html.part.in b/doc/clients/toplinks.html.part.in index 6b20c19f0..4c0da6bfc 100644 --- a/doc/clients/toplinks.html.part.in +++ b/doc/clients/toplinks.html.part.in @@ -36,7 +36,7 @@ </td> <td class="currentpage"> - <a href="###TOPURI###clients/importare.html">importare</a> + <a href="###TOPURI###clients/reconcilio.html">reconcilio</a> </td> <td class="currentpage"> @@ -54,7 +54,7 @@ </td> <td class="currentpage"> - <a href="###TOPURI###clients/reconcilio.html">reconcilio</a> + </td> <td class="currentpage"> diff --git a/doc/faq/different.html.part b/doc/faq/different.html.part index a339fb20e..15766fb65 100644 --- a/doc/faq/different.html.part +++ b/doc/faq/different.html.part @@ -96,4 +96,4 @@ for ebuilds.</p> <p>To use <code>cave import</code>, you will first have to configure an <a href="../configuration/repositories/installed_unpackaged.html"><code>installed_unpackaged</code></a> format repository.</p> -<p>To get a more direct equivalent of package.provided, you can "install" an empty directory with importare.</p> +<p>To get a more direct equivalent of package.provided, you can "install" an empty directory with cave import.</p> diff --git a/doc/index.html.part.in b/doc/index.html.part.in index 0751dc667..1d0d01b6b 100644 --- a/doc/index.html.part.in +++ b/doc/index.html.part.in @@ -88,7 +88,6 @@ the exheres repository format.</p> <ul> <li><a href="clients/paludis.html">paludis</a>, the original console package management client.</li> - <li><a href="clients/importare.html">importare</a>, the unpackaged package installer.</li> <li><a href="clients/reconcilio.html">reconcilio</a>, a tool for rebuilding packages with broken linkage.</li> </ul> diff --git a/src/clients/cave/resolve_cmdline.cc b/src/clients/cave/resolve_cmdline.cc index b2cead475..c255b57e3 100644 --- a/src/clients/cave/resolve_cmdline.cc +++ b/src/clients/cave/resolve_cmdline.cc @@ -109,7 +109,7 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A ("auto", 'a', "If the target is a set, if-same, otherwise never") ("never", 'n', "Never") ("if-transient", 't', "Only if the installed package is transient " - "(e.g. from 'importare')") + "(e.g. from 'cave import')") ("if-same", 's', "If it is the same as the proposed replacement (that is, if it has the same " "version, and no non-special use flags or choices have had their values changed)") ("if-same-version", 'v', "If it is the same version as the proposed replacement") @@ -122,7 +122,7 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A args::EnumArg::EnumArgOptions ("never", 'n', "Never") ("if-transient", 't', "Only if the installed package is transient " - "(e.g. from 'importare') (default if --everything)") + "(e.g. from 'cave import') (default if --everything)") ("if-same", 's', "If it is the same as the proposed replacement (that is, if it has the same " "version, and no non-special use flags or choices have had their values changed) (default if --complete)") ("if-same-version", 'v', "If it is the same version as the proposed replacement") diff --git a/src/clients/importare/Makefile.am b/src/clients/importare/Makefile.am deleted file mode 100644 index 96e3735f2..000000000 --- a/src/clients/importare/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -include $(top_srcdir)/misc/common-makefile.am - -AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src \ - @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@ - -SUBDIRS = . - -bin_PROGRAMS = importare -noinst_PROGRAMS = man-importare -man_MANS = importare.1 - -importare.1 : man-importare - ./man-importare > $@ - -man_importare_SOURCES = \ - man_importare.cc \ - command_line.hh \ - command_line.cc - -man_importare_LDADD = \ - $(top_builddir)/paludis/args/legacy/libpaludisargslegacy_@PALUDIS_PC_SLOT@.la \ - $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \ - $(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \ - $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \ - $(top_builddir)/src/output/liboutput.a \ - $(DYNAMIC_LD_LIBS) - -importare_SOURCES = \ - command_line.hh command_line.cc \ - install.hh install.cc \ - importare.cc - -importare_LDADD = \ - $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \ - $(top_builddir)/paludis/legacy/libpaludislegacy_@PALUDIS_PC_SLOT@.la \ - $(top_builddir)/paludis/args/legacy/libpaludisargslegacy_@PALUDIS_PC_SLOT@.la \ - $(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \ - $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \ - $(top_builddir)/src/output/liboutput.a \ - $(DYNAMIC_LD_LIBS) - -TESTS = - -EXTRA_DIST = \ - $(man_MANS) \ - $(TESTS) - -DISTCLEANFILES = $(man_MANS) $(noinst_DATA) - diff --git a/src/clients/importare/command_line.cc b/src/clients/importare/command_line.cc deleted file mode 100644 index 8da5ac210..000000000 --- a/src/clients/importare/command_line.cc +++ /dev/null @@ -1,126 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "command_line.hh" -#include <paludis/util/singleton-impl.hh> - -using namespace paludis; - -template class paludis::Singleton<CommandLine>; - -CommandLine::CommandLine() : - ArgsHandler(), - - action_args(main_options_section(), "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)", false), - a_version(&action_args, "version", 'V', "Display program version", false), - a_help(&action_args, "help", 'h', "Display program help", false), - - general_args(main_options_section(), "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", false), - a_no_color(&a_no_colour, "no-color"), - a_force_colour(&general_args, "force-colour", '\0', "Force the use of colour", false), - a_force_color(&a_force_colour, "force-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", true), - - source_args(main_options_section(), "Source options", - "Options affecting the source image"), - a_location(&source_args, "location", 'l', "Location of source image (default: current directory)"), - a_install_under(&source_args, "install-under", 'u', "Install under a given directory (default: /)"), - a_rewrite_ids_over_to_root(&source_args, "rewrite-ids-over-to-root", 'r', - "Change any UID or GID over this value to 0 (-1 disables, default)"), - - metadata_args(main_options_section(), "Metadata options", - "Options affecting generated metadata"), - 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", true), - - install_args(main_options_section(), "Install options", - "Options which are relevant for --install"), - - dl_args(main_options_section()) -{ - add_usage_line("[ --install ] [ --location path/ ] category/package [ version ] [ slot ]"); - - install_args.a_add_to_world_spec.remove(); - install_args.a_fetch.remove(); - install_args.a_no_safe_resume.remove(); - - dl_args.dl_reinstall_targets.remove(); - - add_environment_variable("IMPORTARE_OPTIONS", "Default command-line options."); - - add_note( - "importare requires a repository with format 'installed_unpackaged' configured and available. It cannot use " - "a standard VDB or suchlike because there is no ebuild available."); - add_note( - "Packages installed using importare will not be visible to broken ebuilds that illegally access the VDB. " - "This means that things like 'built_with_use' will not realise that the package is installed."); - - add_note("Importare is deprecated. Use 'cave import' instead."); - - add_example( - "importare --location img/ unpackaged/myapp 1.23", - "Install the contents of img/ (which could be produced, for example, using 'sudo make DESTDIR=img/ install' " - "from an autotools package) as 'unpackaged/myapp' version 1.23. If 'unpackaged/myapp' is already installed, " - "it will be replaced."); - add_example( - "importare --location img/ unpackaged/myapp 1.23 --run-dependency dev-libs/mpfr --run-dependency dev-libs/gmp", - "As above, and add dependencies. Dependencies are used for resolution and to provide correct output for " - "paludis --uninstall(-unused)."); - add_example( - "importare --location img/ unpackaged/myapp 1.23 --preserve-metadata", - "If an existing version of unpackaged/myapp was installed using importare, copies metadata (build and run " - "dependencies, and description) from that version."); - add_example( - "importare --location /var/empty sys-apps/portage 2.2", - "Install an empty fake package named 'sys-apps/portage', version 2.2. DANGEROUS!"); -} - -std::string -CommandLine::app_name() const -{ - return "importare"; -} - -std::string -CommandLine::app_synopsis() const -{ - return "The deprecated Paludis unpackaged package installer"; -} - -std::string -CommandLine::app_description() const -{ - return - "importare can be used to manage packages where no real package file is available. Importare is " - "deprecated; use 'cave import' instead."; -} - -CommandLine::~CommandLine() -{ -} - diff --git a/src/clients/importare/command_line.hh b/src/clients/importare/command_line.hh deleted file mode 100644 index 9303265f6..000000000 --- a/src/clients/importare/command_line.hh +++ /dev/null @@ -1,73 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2007, 2008, 2010 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef PALUDIS_GUARD_SRC_CLIENTS_IMPORTARE_COMMAND_LINE_HH -#define PALUDIS_GUARD_SRC_CLIENTS_IMPORTARE_COMMAND_LINE_HH 1 - -#include <paludis/args/args.hh> -#include <paludis/util/singleton.hh> -#include <paludis/args/legacy/dep_list_args_group.hh> -#include <paludis/args/legacy/install_args_group.hh> -#include <paludis/args/log_level_arg.hh> - -class CommandLine : - public paludis::args::ArgsHandler, - public paludis::Singleton<CommandLine> -{ - friend class paludis::Singleton<CommandLine>; - - private: - CommandLine(); - ~CommandLine(); - - public: - virtual std::string app_name() const; - virtual std::string app_synopsis() const; - virtual std::string app_description() const; - - paludis::args::ArgsGroup action_args; - paludis::args::SwitchArg a_install; - paludis::args::SwitchArg a_version; - paludis::args::SwitchArg a_help; - - paludis::args::ArgsGroup general_args; - paludis::args::LogLevelArg a_log_level; - paludis::args::SwitchArg a_no_colour; - paludis::args::AliasArg a_no_color; - paludis::args::SwitchArg a_force_colour; - paludis::args::AliasArg a_force_color; - paludis::args::StringArg a_environment; - paludis::args::SwitchArg a_compact; - - paludis::args::ArgsGroup source_args; - paludis::args::StringArg a_location; - paludis::args::StringArg a_install_under; - paludis::args::IntegerArg a_rewrite_ids_over_to_root; - - paludis::args::ArgsGroup metadata_args; - paludis::args::StringArg a_description; - paludis::args::StringSetArg a_build_dependency; - paludis::args::StringSetArg a_run_dependency; - paludis::args::SwitchArg a_preserve_metadata; - - paludis::args::InstallArgsGroup install_args; - paludis::args::DepListArgsGroup dl_args; -}; - -#endif diff --git a/src/clients/importare/importare.cc b/src/clients/importare/importare.cc deleted file mode 100644 index a831e3179..000000000 --- a/src/clients/importare/importare.cc +++ /dev/null @@ -1,278 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "command_line.hh" -#include "install.hh" - -#include <paludis/args/do_help.hh> -#include <src/output/colour.hh> - -#include <paludis/environment_factory.hh> -#include <paludis/util/system.hh> -#include <paludis/util/log.hh> -#include <paludis/util/map.hh> -#include <paludis/util/sequence.hh> -#include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/about.hh> -#include <paludis/repository_factory.hh> -#include <paludis/package_id.hh> -#include <paludis/metadata_key.hh> -#include <paludis/generator.hh> -#include <paludis/filter.hh> -#include <paludis/filtered_generator.hh> -#include <paludis/selection.hh> -#include <paludis/user_dep_spec.hh> -#include <paludis/unformatted_pretty_printer.hh> - -#include <algorithm> -#include <iterator> -#include <iostream> -#include <vector> - -using namespace paludis; -using std::cout; -using std::cerr; -using std::endl; - -namespace -{ - struct DoVersion - { - }; - - void display_version() - { - cout << "importare, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "." - << PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX; - if (! std::string(PALUDIS_GIT_HEAD).empty()) - cout << " git " << PALUDIS_GIT_HEAD; - cout << endl; - } - - std::string from_keys(const std::shared_ptr<const Map<std::string, std::string> > & m, - const std::string & k) - { - Map<std::string, std::string>::ConstIterator mm(m->find(k)); - if (m->end() == mm) - return ""; - else - return mm->second; - } -} - -int -main(int argc, char *argv[]) -{ - std::string options(paludis::getenv_with_default("IMPORTARE_OPTIONS", "")); - if (! options.empty()) - options = "(" + options + ") "; - options += join(argv + 1, argv + argc, " "); - - Context context(std::string("In program ") + argv[0] + " " + options + ":"); - - Log::get_instance()->message("importare.deprecated", ll_warning, lc_context) - << "importare is deprecated. Use 'cave import' instead."; - - try - { - CommandLine::get_instance()->run(argc, argv, "importare", "IMPORTARE_OPTIONS", "IMPORTARE_CMDLINE"); - set_use_colour(! CommandLine::get_instance()->a_no_colour.specified()); - set_force_colour(CommandLine::get_instance()->a_force_colour.specified()); - - if (CommandLine::get_instance()->a_help.specified()) - throw args::DoHelp(); - - if (CommandLine::get_instance()->a_version.specified()) - throw DoVersion(); - - if (CommandLine::get_instance()->a_log_level.specified()) - Log::get_instance()->set_log_level(CommandLine::get_instance()->a_log_level.option()); - else - Log::get_instance()->set_log_level(ll_qa); - - Log::get_instance()->set_program_name(argv[0]); - - /* need at most one action */ - if (1 < ( - CommandLine::get_instance()->a_install.specified() - )) - throw args::DoHelp("you should specify at most one action"); - - std::string paludis_command("paludis"), env_spec; - - if (CommandLine::get_instance()->a_environment.specified()) - { - env_spec = CommandLine::get_instance()->a_environment.argument(); - paludis_command.append(" --" + CommandLine::get_instance()->a_environment.long_name() + " " + - CommandLine::get_instance()->a_environment.argument()); - } - - paludis_command.append(" --" + CommandLine::get_instance()->a_log_level.long_name() + " " + - CommandLine::get_instance()->a_log_level.argument()); - - if (CommandLine::get_instance()->a_no_color.specified()) - paludis_command.append(" --" + CommandLine::get_instance()->a_no_color.long_name()); - - if (CommandLine::get_instance()->a_force_color.specified()) - paludis_command.append(" --" + CommandLine::get_instance()->a_force_color.long_name()); - - paludis_command.append(CommandLine::get_instance()->install_args.paludis_command_fragment()); - paludis_command.append(CommandLine::get_instance()->dl_args.paludis_command_fragment()); - - std::shared_ptr<Environment> env(EnvironmentFactory::get_instance()->create(env_spec)); - env->set_paludis_command(paludis_command); - - std::vector<std::string> params( - CommandLine::get_instance()->begin_parameters(), - CommandLine::get_instance()->end_parameters()); - - if ((params.size() > 3) || (params.size() < 1)) - throw args::DoHelp("install action takes between one and three parameters (cat/pkg version slot)"); - - QualifiedPackageName q(params[0]); - VersionSpec v(params.size() >= 2 ? params[1] : "0", user_version_spec_options()); - SlotName s(params.size() >= 3 ? params[2] : "0"); - - std::string build_dependencies, run_dependencies, description; - - if (CommandLine::get_instance()->a_preserve_metadata.specified()) - { - std::shared_ptr<const PackageIDSequence> old_ids((*env)[selection::AllVersionsSorted(generator::Package(q))]); - std::shared_ptr<const PackageID> old_id; - for (PackageIDSequence::ConstIterator i(old_ids->begin()), i_end(old_ids->end()) ; - i != i_end ; ++i) - { - auto repo(env->package_database()->fetch_repository((*i)->repository_name())); - if (! repo->format_key()) - continue; - if (repo->format_key()->value() != "installed_unpackaged") - continue; - old_id = *i; - break; - } - - if (! old_id) - throw args::DoHelp("--" + CommandLine::get_instance()->a_preserve_metadata.long_name() + " specified but " - "no old ID available"); - - if (old_id->short_description_key()) - description = old_id->short_description_key()->value(); - if (old_id->build_dependencies_key()) - build_dependencies = old_id->build_dependencies_key()->pretty_print_value(UnformattedPrettyPrinter(), { }); - if (old_id->run_dependencies_key()) - run_dependencies = old_id->run_dependencies_key()->pretty_print_value(UnformattedPrettyPrinter(), { }); - } - - if (CommandLine::get_instance()->a_description.specified()) - description = CommandLine::get_instance()->a_description.argument(); - if (CommandLine::get_instance()->a_build_dependency.specified()) - build_dependencies = join( - CommandLine::get_instance()->a_build_dependency.begin_args(), - CommandLine::get_instance()->a_build_dependency.end_args(), ", "); - if (CommandLine::get_instance()->a_run_dependency.specified()) - run_dependencies = join( - CommandLine::get_instance()->a_run_dependency.begin_args(), - CommandLine::get_instance()->a_run_dependency.end_args(), ", "); - - std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>()); - keys->insert("location", stringify( - CommandLine::get_instance()->a_location.specified() ? - FSPath(CommandLine::get_instance()->a_location.argument()) : - FSPath::cwd())); - keys->insert("install_under", stringify( - CommandLine::get_instance()->a_install_under.specified() ? - FSPath(CommandLine::get_instance()->a_install_under.argument()) : - FSPath("/"))); - keys->insert("rewrite_ids_over_to_root", stringify( - CommandLine::get_instance()->a_rewrite_ids_over_to_root.specified() ? - CommandLine::get_instance()->a_rewrite_ids_over_to_root.argument() : -1)); - keys->insert("format", "unpackaged"); - keys->insert("name", stringify(q)); - keys->insert("version", stringify(v)); - keys->insert("slot", stringify(s)); - keys->insert("description", description); - keys->insert("build_dependencies", build_dependencies); - keys->insert("run_dependencies", run_dependencies); - std::shared_ptr<Repository> repo(RepositoryFactory::get_instance()->create(env.get(), - std::bind(from_keys, keys, std::placeholders::_1))); - env->package_database()->add_repository(10, repo); - std::shared_ptr<const PackageIDSequence> ids(repo->package_ids(q)); - if (1 != std::distance(ids->begin(), ids->end())) - throw InternalError(PALUDIS_HERE, "ids is '" + join(indirect_iterator(ids->begin()), indirect_iterator( - ids->end()), " ") + "'"); - - return do_install(env, *ids->begin()); - } - catch (const DoVersion &) - { - display_version(); - cout << endl; - cout << "Paludis comes with ABSOLUTELY NO WARRANTY. Paludis is free software, and you" << endl; - cout << "are welcome to redistribute it under the terms of the GNU General Public" << endl; - cout << "License, version 2." << endl; - - return EXIT_SUCCESS; - } - catch (const paludis::args::ArgsError & e) - { - cerr << "Usage error: " << e.message() << endl; - cerr << "Try " << argv[0] << " --help" << endl; - return EXIT_FAILURE; - } - catch (const args::DoHelp & h) - { - if (h.message.empty()) - { - cout << "Usage: " << argv[0] << " [options]" << endl; - cout << endl; - cout << *CommandLine::get_instance(); - return EXIT_SUCCESS; - } - else - { - cerr << "Usage error: " << h.message << endl; - cerr << "Try " << argv[0] << " --help" << endl; - return EXIT_FAILURE; - } - } - catch (const Exception & e) - { - cout << endl; - cerr << "Unhandled exception:" << endl - << " * " << e.backtrace("\n * ") - << e.message() << " (" << e.what() << ")" << endl; - return EXIT_FAILURE; - } - catch (const std::exception & e) - { - cout << endl; - cerr << "Unhandled exception:" << endl - << " * " << e.what() << endl; - return EXIT_FAILURE; - } - catch (...) - { - cout << endl; - cerr << "Unhandled exception:" << endl - << " * Unknown exception type. Ouch..." << endl; - return EXIT_FAILURE; - } -} - - diff --git a/src/clients/importare/install.cc b/src/clients/importare/install.cc deleted file mode 100644 index 24a36e474..000000000 --- a/src/clients/importare/install.cc +++ /dev/null @@ -1,159 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2007, 2008, 2010 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "install.hh" -#include "command_line.hh" -#include <src/output/console_install_task.hh> -#include <paludis/args/do_help.hh> - -#include <iostream> -#include <cstdlib> -#include <cstring> - -#include <paludis/legacy/install_task.hh> -#include <paludis/legacy/tasks_exceptions.hh> - -#include <paludis/util/log.hh> -#include <paludis/util/tokeniser.hh> -#include <paludis/util/sequence.hh> -#include <paludis/util/set.hh> - -#include <paludis/hook.hh> -#include <paludis/package_id.hh> -#include <paludis/metadata_key.hh> -#include <paludis/mask.hh> -#include <paludis/action.hh> -#include <paludis/name.hh> -#include <paludis/choice.hh> - -using namespace paludis; - -using std::cerr; -using std::cout; -using std::endl; - -namespace -{ - class OurInstallTask : - public ConsoleInstallTask - { - private: - std::shared_ptr<Environment> _env; - - public: - OurInstallTask(std::shared_ptr<Environment> env, const DepListOptions & options, - std::shared_ptr<const DestinationsSet> destinations) : - ConsoleInstallTask(env.get(), options, destinations), - _env(env) - { - } - - virtual bool want_full_install_reasons() const - { - return CommandLine::get_instance()->install_args.want_full_install_reasons(); - } - - virtual bool want_tags_summary() const - { - return CommandLine::get_instance()->install_args.want_tags_summary(); - } - - virtual bool want_install_reasons() const - { - return CommandLine::get_instance()->install_args.want_install_reasons(); - } - - virtual bool want_unchanged_use_flags() const - { - return CommandLine::get_instance()->install_args.want_unchanged_use_flags(); - } - - virtual bool want_changed_use_flags() const - { - return CommandLine::get_instance()->install_args.want_changed_use_flags(); - } - - virtual bool want_new_use_flags() const - { - return CommandLine::get_instance()->install_args.want_new_use_flags(); - } - - virtual bool want_use_summary() const - { - return CommandLine::get_instance()->install_args.want_use_summary(); - } - - virtual bool want_compact() const - { - return CommandLine::get_instance()->a_compact.specified(); - } - - virtual bool want_suggestions() const - { - return false; - } - - virtual bool want_new_descriptions() const - { - return CommandLine::get_instance()->install_args.want_new_descriptions(); - } - - virtual bool want_existing_descriptions() const - { - return CommandLine::get_instance()->install_args.want_existing_descriptions(); - } - - virtual std::string make_resume_command(const bool) const - { - return ""; - } - - void show_resume_command() const - { - } - }; -} - -int -do_install(const std::shared_ptr<Environment> & env, const std::shared_ptr<const PackageID> & target) -{ - Context context("When performing install action from command line:"); - - CommandLine::get_instance()->install_args.a_add_to_world_spec.set_specified(true); - CommandLine::get_instance()->install_args.a_add_to_world_spec.set_argument(stringify(target->name())); - - DepListOptions options; - CommandLine::get_instance()->dl_args.populate_dep_list_options(env.get(), options); - CommandLine::get_instance()->install_args.populate_dep_list_options(env.get(), options); - - OurInstallTask task(env, options, CommandLine::get_instance()->install_args.destinations(env.get())); - CommandLine::get_instance()->install_args.populate_install_task(env.get(), task); - CommandLine::get_instance()->dl_args.populate_install_task(env.get(), task); - - std::shared_ptr<PackageIDSequence> targets(std::make_shared<PackageIDSequence>()); - targets->push_back(target); - task.set_targets_from_exact_packages(targets); - task.execute(); - - cout << endl; - - return task.exit_status(); -} - - diff --git a/src/clients/importare/install.hh b/src/clients/importare/install.hh deleted file mode 100644 index 2f00ae0f8..000000000 --- a/src/clients/importare/install.hh +++ /dev/null @@ -1,31 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2007, 2008 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef PALUDIS_GUARD_SRC_CLIENTS_IMPORTARE_INSTALL_HH -#define PALUDIS_GUARD_SRC_CLIENTS_IMPORTARE_INSTALL_HH 1 - -#include <paludis/environment-fwd.hh> -#include <paludis/package_id-fwd.hh> -#include <memory> - -int do_install( - const std::shared_ptr<paludis::Environment> &, - const std::shared_ptr<const paludis::PackageID> & target); - -#endif diff --git a/src/clients/importare/man_importare.cc b/src/clients/importare/man_importare.cc deleted file mode 100644 index 2917ce694..000000000 --- a/src/clients/importare/man_importare.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2006, 2007, 2009 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "command_line.hh" -#include <paludis/args/man.hh> - -#include <iostream> -#include <cstdlib> - -using std::cout; -using std::endl; - -namespace -{ - struct ManCommandLine : - paludis::args::ArgsHandler - { - paludis::args::ArgsGroup group; - paludis::args::SwitchArg a_html; - - ManCommandLine() : - group(main_options_section(), "", ""), - a_html(&group, "html", '\0', "", false) - { - } - - virtual std::string app_name() const - { - return ""; - } - - virtual std::string app_description() const - { - return ""; - } - - virtual std::string app_synopsis() const - { - return ""; - } - }; -} - -int -main(int argc, char * argv[]) -{ - ManCommandLine cmdline; - cmdline.run(argc, argv, "", "", ""); - - if (cmdline.a_html.specified()) - { - paludis::args::HtmlWriter hw(cout); - paludis::args::generate_doc(hw, CommandLine::get_instance()); - } - else - { - paludis::args::ManWriter mw(cout); - paludis::args::generate_doc(mw, CommandLine::get_instance()); - } - - return EXIT_SUCCESS; -} - diff --git a/zsh-completion/Makefile.am b/zsh-completion/Makefile.am index 87a2b046c..e6d2aaf3c 100644 --- a/zsh-completion/Makefile.am +++ b/zsh-completion/Makefile.am @@ -1,5 +1,5 @@ MAINTAINERCLEANFILES = Makefile.in -noinst_DATA = _paludis _adjutrix _paludis_packages _importare _reconcilio _cave +noinst_DATA = _paludis _adjutrix _paludis_packages _reconcilio _cave EXTRA_DIST = $(noinst_DATA) AUTOMAKE_OPTIONS = 1.11 parallel-tests diff --git a/zsh-completion/_importare b/zsh-completion/_importare deleted file mode 100644 index f389d500a..000000000 --- a/zsh-completion/_importare +++ /dev/null @@ -1,75 +0,0 @@ -#compdef importare -# -# vim: set et sw=4 sts=4 ts=4 ft=zsh : -# ZSH completion for adjutrix -# Written by Baptiste Daroussin <baptux at free.fr> - -_importare() { - local actions action_options general_options source_options metadata_options install_options deplist_descriptions deplist_options - actions=( - --install - --version -V - --help -h - ) - general_options=( - '--log-level[Specify the log level]:log level:((debug\:"Show debug output (noisy)" qa\:"Show QA messages and warnings only (default)" warning\:"Show warnings only" silent\:"Suppress all log messages (UNSAFE)"))' - '(--no-colour --no-color)'{--no-colour,--no-color}"[Do not use colour]" - "(--environment -E)"{-E,--environment}"[Environment specification]:environment specification: " - "--compact[Display output using one line per entry]" - ) - source_options=( - "(--location -l)"{-l,--location}"[Location of source image]:Repository:_files -/" - ) - metadata_options=( - "(--description -D)"{-D,--description}"[Specify a package description]:Description:" - "(--build-dependency -B)"{-B,--build-dependency}"[Specify a build dependency]:Build dependency:_paludis_packages installed" - "(--run-dependency -R)"{--run-dependency,-R}"[Specify a run dependency]:Run dependency:_paludis_packages installed" - "(--preserve-metadata -P)"{-P,--preserve-metadata}"[If replacing a package, copy its description and dependencies]" - ) - install_options=( - "(--pretend -p)"{--pretend,-p}"[Pretend only]" - "(--destinations -d)"{--destinations,-d}"[Use specified destinations instead of defaults]:Destinations:_paludis_packages repositories" - "--show-reasons[Show why packages are being (un)installed]:Verbosity:((none\:Don\'t\ show\ any\ information summary\:Show\ a\ summary full\:Show\ full\ output))" - "--show-use-descriptions[Show descriptions of USE flags]:Which:((none\:Don\'t\ show\ any\ descriptions new\:Show\ for\ new\ use\ flags changed\:Show\ for\ new\ and\ changed\ flags all\:Show for all flags))" - "--show-package-descriptions[Show package descriptions]:When:((none\:Don\'t\ show\ any\ descriptions new\:Show\ descriptions\ for\ new\ packages all\:Show\ descriptions\ for\ all\ packages))" - "--continue-on-failure[Whether to continue after a fetch or install error]:When:((if-fetch-only\:If\ fetching\ only never\:Never if-satisfied\:If\ remaining\ packages\ dependencies\ are\ satisfied if-independent\:If\ independent\ of\ failed\ and\ skipped\ packages always\:Always))" - "--skip-phase[Skip phases with a given name]:Phase: " - "--abort-at-phase[Abort when a phase with a given name is encountered]:Phase: " - "--skip-until-phase[Skip all phases until a phase with a given name is encountered]:Phase: " - "--change-phases-for[Control which packages to change phases for]:Target:((all\:'All packages' first\:'Only the first package on the list' last\:'Only the last package on the list'))" - ) - deplist_descriptions=' - pre\:"As pre dependencies" - pre-or-post\:"As pre dependencies, or post dependencies where needed" - post\:"As post dependencies" - try-post\:"As post dependencies, with no error for failures" - discard\:"Discard (default)"' - deplist_options=( - "--dl-blocks[How to handle blocks]:How:(accumulate error discard)" - "--dl-override-masks[Zero or more mask kinds that can be overridden as necessary]:What:(none tilde-keyword unkeyworded profile repository license)" - "--dl-suggested[How to handle suggested dependencies]:How:(show install discard)" - "--dl-downgrade[When to downgrade packages]:When:(as-needed warning error)" - "--dl-reinstall[When to reinstall packages]:When:(never always if-use-changed)" - "--dl-reinstall-scm[When to reinstall scm packages]:When:(never always daily weekly)" - "--dl-reinstall-targets[When to reinstall targets]:When:(auto never always)" - "--dl-upgrade[When to upgrade packages]:When:(always as-needed)" - "--dl-deps-default[Override default behaviour for all dependency classes]:How:(($deplist_descriptions))" - "--dl-installed-deps-pre[How to handle pre dependencies for installed packages]:How:(($deplist_descriptions))" - "--dl-installed-deps-runtime[How to handle runtime dependencies for installed packages]:How:(($deplist_descriptions))" - "--dl-installed-deps-post[How to handle post dependencies for installed packages]:How:(($deplist_descriptions))" - "--dl-uninstalled-deps-pre[How to handle pre dependencies for uninstalled packages]:How:(($deplist_descriptions))" - "--dl-uninstalled-deps-post[How to handle post dependencies for uninstalled packages]:How:(($deplist_descriptions))" - "--dl-uninstalled-deps-runtime[How to handle runtime dependencies for uninstalled packages]:How:(($deplist_descriptions))" - "--dl-uninstalled-deps-suggested[How to handle suggested dependencies for uninstalled packages]:How:(($deplist_descriptions))" - "--dl-circular[How to handle circular dependencies]:How:(error discard)" - "--dl-fall-back[When to fall back to installed packages]:When:(as-needed-except-targets as-needed never)" - "--dl-new-slots[When to pull in new slots (works with --dl-upgrade)]:When:(always as-needed)" - ) - action_options=( - "($actions)"{-i,--install}"[Install one or more packages]" - "(: -)"{--version,-V}"[Display program version]" - "(: -)"{--help,-h}"[Display program help]" - ) - _arguments -s \ - $general_options[@] $source_options[@] $metadata_options[@] $install_options[@] $deplist_options[@] $action_options[@] && return 0 -} |