00001 /* vim: set sw=4 sts=4 et foldmethod=syntax : */ 00002 00003 /* 00004 * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh 00005 * Copyright (c) 2007 David Leverton 00006 * 00007 * This file is part of the Paludis package manager. Paludis is free software; 00008 * you can redistribute it and/or modify it under the terms of the GNU General 00009 * Public License version 2, as published by the Free Software Foundation. 00010 * 00011 * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY 00012 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00013 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00014 * details. 00015 * 00016 * You should have received a copy of the GNU General Public License along with 00017 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00018 * Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 00021 #ifndef PALUDIS_GUARD_SRC_COMMON_ARGS_INSTALL_ARGS_HH 00022 #define PALUDIS_GUARD_SRC_COMMON_ARGS_INSTALL_ARGS_HH 1 00023 00024 #include <paludis/util/set.hh> 00025 00026 #include <paludis/args/args.hh> 00027 #include <paludis/dep_list-fwd.hh> 00028 #include <paludis/install_task.hh> 00029 00030 /** \file 00031 * Declarations for the InstallArgsGroup class. 00032 * 00033 * \ingroup g_args 00034 * 00035 * \section Examples 00036 * 00037 * - None at this time. 00038 */ 00039 00040 namespace paludis 00041 { 00042 namespace args 00043 { 00044 /** 00045 * Standard install arguments. 00046 * 00047 * \ingroup g_args 00048 * \since 0.26 00049 * \nosubgrouping 00050 */ 00051 class PALUDIS_VISIBLE InstallArgsGroup : public ArgsGroup 00052 { 00053 public: 00054 /// Constructor. 00055 InstallArgsGroup(ArgsSection *, const std::string &, const std::string &); 00056 00057 /// Destructor 00058 ~InstallArgsGroup(); 00059 00060 /// \name (Un)Install arguments 00061 /// { 00062 00063 /// --pretend 00064 paludis::args::SwitchArg a_pretend; 00065 00066 /// --destinations 00067 paludis::args::StringSetArg a_destinations; 00068 00069 /// --preserve-world 00070 paludis::args::SwitchArg a_preserve_world; 00071 00072 /// --add-to-world-spec 00073 paludis::args::StringArg a_add_to_world_spec; 00074 00075 /// --fetch 00076 paludis::args::SwitchArg a_fetch; 00077 00078 /// --no-safe-resume 00079 paludis::args::SwitchArg a_no_safe_resume; 00080 00081 /// --show-reasons 00082 paludis::args::EnumArg a_show_reasons; 00083 00084 /// --show-use-descriptions 00085 paludis::args::EnumArg a_show_use_descriptions; 00086 00087 /// --show-package-descriptions 00088 paludis::args::EnumArg a_show_package_descriptions; 00089 00090 /// --continue-on-failure 00091 paludis::args::EnumArg a_continue_on_failure; 00092 paludis::args::AliasArg a_continue_on_eroyf; 00093 00094 /// --skip-phase 00095 paludis::args::StringSetArg a_skip_phase; 00096 00097 /// --abort-at-phase 00098 paludis::args::StringSetArg a_abort_at_phase; 00099 00100 /// --skip-until-phase 00101 paludis::args::StringSetArg a_skip_until_phase; 00102 00103 /// --change-phases-for 00104 paludis::args::EnumArg a_change_phases_for; 00105 00106 /// } 00107 00108 /** 00109 * Populate a DepListOptions from our values. 00110 */ 00111 void populate_dep_list_options(const Environment *, DepListOptions &) const; 00112 00113 /** 00114 * Fetch our specified destinations set. 00115 */ 00116 std::tr1::shared_ptr<const DestinationsSet> destinations(Environment *) const; 00117 00118 /** 00119 * Populate an InstallTask from our values. 00120 */ 00121 void populate_install_task(const Environment *, InstallTask &) const; 00122 00123 ///\name Assorted options 00124 ///\{ 00125 00126 bool want_full_install_reasons() const; 00127 bool want_install_reasons() const; 00128 bool want_tags_summary() const; 00129 00130 bool want_use_summary() const; 00131 bool want_unchanged_use_flags() const; 00132 bool want_changed_use_flags() const; 00133 bool want_new_use_flags() const; 00134 00135 bool want_new_descriptions() const; 00136 bool want_existing_descriptions() const; 00137 00138 ///\} 00139 00140 /** 00141 * Create a fragment for Environment::paludis_command. 00142 */ 00143 std::string paludis_command_fragment() const; 00144 00145 /** 00146 * Create a fragment for a resume command. 00147 */ 00148 std::string resume_command_fragment(const InstallTask &) const; 00149 }; 00150 } 00151 } 00152 00153 #endif