diff options
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | doc/clients/Makefile.am | 12 | ||||
-rw-r--r-- | doc/clients/index.html.part | 6 | ||||
-rw-r--r-- | doc/clients/toplinks.html.part.in | 2 | ||||
-rw-r--r-- | doc/index.html.part.in | 6 | ||||
-rw-r--r-- | paludis/action.hh | 3 | ||||
-rw-r--r-- | src/clients/appareo/Makefile.am | 86 | ||||
-rw-r--r-- | src/clients/appareo/appareo.cc | 370 | ||||
-rw-r--r-- | src/clients/appareo/command_line.cc | 96 | ||||
-rw-r--r-- | src/clients/appareo/command_line.hh | 70 | ||||
-rwxr-xr-x | src/clients/appareo/help_TEST | 4 | ||||
-rw-r--r-- | src/clients/appareo/man_appareo.cc | 64 | ||||
-rwxr-xr-x | src/clients/appareo/version_TEST | 4 |
15 files changed, 5 insertions, 729 deletions
diff --git a/.gitignore b/.gitignore index 0ccca8c9a..9db97a258 100644 --- a/.gitignore +++ b/.gitignore @@ -76,7 +76,6 @@ paludis-*.*.*.tar.bz2 /doc/changelog.html /doc/changelog.html.part /doc/changelog.subst -/doc/clients/appareo.html /doc/clients/cave.html /doc/clients/cave-config.html /doc/clients/cave-contents.html @@ -483,10 +482,6 @@ paludis-*.*.*.tar.bz2 /paludis/version_operator_TEST /paludis/version_spec_TEST /pkg-config/paludis.pc -/src/clients/appareo/appareo -/src/clients/appareo/*.txt -/src/clients/appareo/*.xml -/src/clients/appareo/*.html-man-fragment /src/clients/cave/cave /src/clients/cave/*.txt !/src/clients/cave/cave.txt diff --git a/Makefile.am b/Makefile.am index 907cbcf2c..66b8370e8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-ruby --enable-ruby-doc --enable-vim \ --with-hacked-log-dir='$${DESTDIR}$${prefix}/log_dir' \ --with-repositories=default,accounts,gemcutter \ --with-environments=default,portage \ - --with-clients=default,appareo,cave \ + --with-clients=default,cave \ --with-default-distribution=giant-space-monkey \ --enable-htmltidy --enable-search-index diff --git a/configure.ac b/configure.ac index 6b5f05432..495d59ab3 100644 --- a/configure.ac +++ b/configure.ac @@ -1582,7 +1582,7 @@ AC_DEFINE_UNQUOTED([DEFAULT_DISTRIBUTION], "$DEFAULT_DISTRIBUTION", [Default dis dnl }}} dnl {{{ clients -ALL_CLIENTS="appareo cave" +ALL_CLIENTS="cave" ALL_CLIENTS_HTML="" for a in $ALL_CLIENTS ; do ALL_CLIENTS_HTML="$ALL_CLIENTS_HTML $a.html" @@ -1595,7 +1595,6 @@ AC_ARG_WITH([clients], all All available clients default Equivalent to cave - appareo A tool for generating manifests cave The modular Paludis client], [clients="`echo $with_clients | tr ',' ' '`"], [clients="$DEFAULT_CLIENTS"]) @@ -1874,7 +1873,6 @@ AC_CONFIG_FILES([ ruby/demos/Makefile src/Makefile src/clients/Makefile - src/clients/appareo/Makefile src/clients/cave/Makefile src/output/Makefile vim/Makefile diff --git a/doc/clients/Makefile.am b/doc/clients/Makefile.am index 030b37792..51fb28983 100644 --- a/doc/clients/Makefile.am +++ b/doc/clients/Makefile.am @@ -97,18 +97,6 @@ HTML_LOG_COMPILER = $(LOG_COMPILER) index.html : header.html.part $(srcdir)/index.html.part footer.html.part cat header.html.part $(srcdir)/index.html.part footer.html.part > $@ -appareo.html : header.html.part footer.html.part - { cat header.html.part && { \ - echo "<h1>appareo</h1>"; \ - if test -f $(top_builddir)/src/clients/appareo/appareo.html-man-fragment ; then \ - cat $(top_builddir)/src/clients/appareo/appareo.html-man-fragment ; \ - elif test -f $(top_srcdir)/src/clients/appareo/appareo.html-man-fragment ; then \ - cat $(top_srcdir)/src/clients/appareo/appareo.html-man-fragment ; \ - else \ - echo "<p>Sorry, documentation was generated without support for the appareo client.</p>" ; \ - fi ; } \ - && cat footer.html.part ; } > $@ - cave.html : header.html.part footer.html.part { cat header.html.part && { \ echo "<h1>cave</h1>"; \ diff --git a/doc/clients/index.html.part b/doc/clients/index.html.part index 1e34230b0..dcece3bd5 100644 --- a/doc/clients/index.html.part +++ b/doc/clients/index.html.part @@ -9,9 +9,3 @@ client.</li> </ul> -<p>For ebuild developers and distribution maintainers:</p> - -<ul> - <li><a href="appareo.html">appareo</a>, a Manifest generation tool.</li> -</ul> - diff --git a/doc/clients/toplinks.html.part.in b/doc/clients/toplinks.html.part.in index b40fef588..02acf112c 100644 --- a/doc/clients/toplinks.html.part.in +++ b/doc/clients/toplinks.html.part.in @@ -18,7 +18,7 @@ </td> <td class="currentpage"> - <a href="###TOPURI###clients/appareo.html">appareo</a> + </td> </tr> diff --git a/doc/index.html.part.in b/doc/index.html.part.in index b4e52b066..08cee1489 100644 --- a/doc/index.html.part.in +++ b/doc/index.html.part.in @@ -84,12 +84,6 @@ the exheres repository format.</p> management client.</li> </ul> -<p>For ebuild developers and distribution maintainers:</p> - -<ul> - <li><a href="clients/appareo.html">appareo</a>, a Manifest generation tool.</li> -</ul> - <h2>API Documentation</h2> <ul> diff --git a/paludis/action.hh b/paludis/action.hh index 8e16793be..ae82ce88f 100644 --- a/paludis/action.hh +++ b/paludis/action.hh @@ -104,7 +104,8 @@ namespace paludis /** * Ignore if a package is or isn't referenced in the Manifest. - * It's useful with appareo not to get errors before generating it. + * It's useful for generating manifests, to avoid getting errors + * before generating it. * * \since 0.46 */ diff --git a/src/clients/appareo/Makefile.am b/src/clients/appareo/Makefile.am deleted file mode 100644 index b01345aec..000000000 --- a/src/clients/appareo/Makefile.am +++ /dev/null @@ -1,86 +0,0 @@ -include $(top_srcdir)/misc/common-makefile.am - -AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src \ - @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@ -DEFS= \ - -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DDATADIR=\"$(datadir)\" \ - -DLIBEXECDIR=\"$(libexecdir)\" \ - -DLIBDIR=\"$(libdir)\" - -SUBDIRS = . - -bin_PROGRAMS = appareo -man_MANS = appareo.1 - -SUFFIXES = .1 .txt .xml .html-man-fragment - -man_MANS_txts = appareo.txt -man_MANS_xmls = appareo.xml -man_MANS_html_man_fragments = appareo.html-man-fragment - -if USE_PREBUILT_DOCUMENTATION -else - -noinst_PROGRAMS = man-appareo - -$(man_MANS_txts) : man-appareo - if ! ./man-appareo `echo $@ | sed -e 's.^appareo-*..' -e 's,\.txt$$,,'` > $@ ; then rm -f $@ ; exit 1 ; fi - -.txt.xml : $(man_MANS_txts) - asciidoc --doctype=manpage --backend=docbook --out-file=$@ --conf=$(top_srcdir)/misc/asciidoc.conf $< - -.xml.1 : $(man_MANS_xmls) - xmlto man $< - -.xml.html-man-fragment : $(man_MANS_xmls) - xmlto html $< -o $@-dir - sed \ - -e '1s,^.*\(<div class="refnamediv">\),\1,' \ - -e '$$s,</body>.*,,' -e '$$s,</div><div class="navfooter"><hr></div>,,' \ - -e 's,<a name="[^"]*"></a>,,g' \ - $@-dir/index.html > $@ - rm -fr $@-dir - -man_appareo_SOURCES = \ - man_appareo.cc \ - command_line.hh \ - command_line.cc - -man_appareo_LDADD = \ - $(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) - -endif - -appareo_SOURCES = \ - command_line.hh command_line.cc \ - appareo.cc - -appareo_LDADD = \ - $(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) - -TESTS = version_TEST \ - help_TEST - -noinst_DATA = $(man_MANS_html_man_fragments) - -EXTRA_DIST = \ - $(man_MANS) \ - $(man_MANS_html_man_fragments) \ - $(TESTS) - -DISTCLEANFILES = \ - $(man_MANS) \ - $(noinst_DATA) \ - $(man_MANS_txts) \ - $(man_MANS_xmls) \ - $(man_MANS_html_man_fragments) - diff --git a/src/clients/appareo/appareo.cc b/src/clients/appareo/appareo.cc deleted file mode 100644 index 0506661d6..000000000 --- a/src/clients/appareo/appareo.cc +++ /dev/null @@ -1,370 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2009 Kim Højgaard-Hansen - * Copyright (c) 2007, 2008, 2009, 2010, 2011 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 <output/colour.hh> -#include <paludis/args/do_help.hh> -#include "command_line.hh" -#include <paludis/about.hh> -#include <paludis/action.hh> -#include <paludis/package_id.hh> -#include <paludis/util/system.hh> -#include <paludis/util/join.hh> -#include <paludis/util/log.hh> -#include <paludis/util/fs_stat.hh> -#include <paludis/util/sequence.hh> -#include <paludis/util/map.hh> -#include <paludis/util/make_named_values.hh> -#include <paludis/repositories/e/e_repository_exceptions.hh> -#include <paludis/standard_output_manager.hh> -#include <paludis/environments/no_config/no_config_environment.hh> -#include <paludis/selection.hh> -#include <paludis/generator.hh> -#include <paludis/filter.hh> -#include <paludis/util/set.hh> -#include <paludis/filtered_generator.hh> -#include <paludis/repository.hh> -#include <algorithm> -#include <functional> -#include <iostream> -#include <map> - -using namespace paludis; -using std::cout; -using std::cerr; -using std::endl; - -typedef std::multimap<std::shared_ptr<const PackageID>, std::string, PackageIDComparator> IDMap; - -namespace -{ - std::shared_ptr<OutputManager> make_standard_output_manager(const Action &) - { - return std::make_shared<StandardOutputManager>(); - } - - WantPhase want_all_phases(const std::string &) - { - return wp_yes; - } - - FSPath get_location_and_add_filters() - { - Context context("When determining tree location:"); - - if (CommandLine::get_instance()->a_repository_directory.specified()) - return FSPath(CommandLine::get_instance()->a_repository_directory.argument()); - - if ((FSPath::cwd() / "profiles").stat().is_directory()) - return FSPath::cwd(); - - if ((FSPath::cwd().dirname() / "profiles").stat().is_directory()) - { - CommandLine::get_instance()->a_category.add_argument(FSPath::cwd().basename()); - CommandLine::get_instance()->a_category.set_specified(true); - return FSPath::cwd().dirname(); - } - - if ((FSPath::cwd().dirname().dirname() / "profiles").stat().is_directory()) - { - CommandLine::get_instance()->a_package.add_argument(FSPath::cwd().basename()); - CommandLine::get_instance()->a_package.set_specified(true); - CommandLine::get_instance()->a_category.add_argument(FSPath::cwd().dirname().basename()); - CommandLine::get_instance()->a_category.set_specified(true); - return FSPath::cwd().dirname().dirname(); - } - - throw ConfigurationError("Cannot find tree location (try specifying --repository-dir)"); - } - - bool fetch_ids(const std::shared_ptr<const PackageIDSequence> & ids, IDMap & results, unsigned & success, unsigned & total) - { - bool no_conflict_with_manifest(true); - for (PackageIDSequence::ConstIterator i(ids->begin()), i_end(ids->end()) ; - i != i_end ; ++i) - { - Context i_context("When fetching ID '" + stringify(**i) + "':"); - - cout << "Processing " << colour(cl_package_name, stringify(**i)) << "..." << endl; - ++total; - - const std::shared_ptr<Sequence<FetchActionFailure> > failures(std::make_shared<Sequence<FetchActionFailure>>()); - try - { - if ((*i)->supports_action(SupportsActionTest<FetchAction>())) - { - FetchAction a(make_named_values<FetchActionOptions>( - n::errors() = failures, - n::exclude_unmirrorable() = false, - n::fetch_parts() = FetchParts() + fp_regulars + fp_extras + fp_unneeded, - n::ignore_not_in_manifest() = true, - n::ignore_unfetched() = false, - n::make_output_manager() = &make_standard_output_manager, - n::safe_resume() = true, - n::want_phase() = &want_all_phases - )); - (*i)->perform_action(a); - ++success; - } - else - results.insert(std::make_pair(*i, "Does not support fetching")); - } - catch (const ActionFailedError & e) - { - bool incremented_success(false); - for (Sequence<FetchActionFailure>::ConstIterator f(failures->begin()), - f_end(failures->end()) ; - f != f_end ; ++f) - { - std::string r; - if (f->requires_manual_fetching()) - r = "manual"; - - if (f->failed_automatic_fetching()) - { - if (! r.empty()) - r.append(", "); - r.append("could not fetch"); - } - - if (! f->failed_integrity_checks().empty()) - { - if (CommandLine::get_instance()->a_override.specified()) - { - if (! incremented_success) - ++success; - incremented_success = true; - } - else - { - no_conflict_with_manifest = false; - if (! r.empty()) - r.append(", "); - r.append(f->failed_integrity_checks()); - } - } - - if (! r.empty()) - results.insert(std::make_pair(*i, f->target_file() + ": " + r)); - } - - if (failures->empty()) - results.insert(std::make_pair(*i, "Unknown fetch error")); - } - catch (const InternalError &) - { - throw; - } - catch (const Exception & e) - { - results.insert(std::make_pair(*i, "Uncaught exception '" + e.message() + "' (" + e.what() + ")")); - } - } - return no_conflict_with_manifest; - } -} - -int -main(int argc, char *argv[]) -{ - std::string options(getenv_with_default("APPAREO_OPTIONS", "")); - if (! options.empty()) - options = "(" + options + ") "; - options += join(argv + 1, argv + argc, " "); - - Context context(std::string("In program ") + argv[0] + " " + options + ":"); - - try - { - CommandLine::get_instance()->run(argc, argv, "appareo", "APPAREO_OPTIONS", "APPAREO_CMDLINE"); - set_use_colour( - (! CommandLine::get_instance()->a_no_colour.specified()) && - (! CommandLine::get_instance()->a_report_file.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_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); - - if (1 < ( - CommandLine::get_instance()->a_manifest.specified() + - CommandLine::get_instance()->a_version.specified() - )) - throw args::DoHelp("you should specify exactly one action"); - - if (! CommandLine::get_instance()->a_write_cache_dir.specified()) - CommandLine::get_instance()->a_write_cache_dir.set_argument("/var/empty"); - - if (! CommandLine::get_instance()->a_repository_directory.specified()) - CommandLine::get_instance()->a_repository_directory.set_argument(stringify(FSPath::cwd())); - - if (CommandLine::get_instance()->a_version.specified()) - { - cout << "appareo, 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 << 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; - } - else - { - std::shared_ptr<FSPathSequence> extra_repository_dirs(std::make_shared<FSPathSequence>()); - for (args::StringSequenceArg::ConstIterator d(CommandLine::get_instance()->a_extra_repository_dir.begin_args()), - d_end(CommandLine::get_instance()->a_extra_repository_dir.end_args()) ; - d != d_end ; ++d) - extra_repository_dirs->push_back(FSPath(*d)); - - std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>()); - keys->insert("distdir", CommandLine::get_instance()->a_download_directory.argument()); - - NoConfigEnvironment env(make_named_values<no_config_environment::Params>( - n::accept_unstable() = true, - n::disable_metadata_cache() = false, - n::extra_accept_keywords() = "", - n::extra_params() = keys, - n::extra_repository_dirs() = extra_repository_dirs, - n::master_repository_name() = CommandLine::get_instance()->a_master_repository_name.argument(), - n::profiles_if_not_auto() = "", - n::repository_dir() = get_location_and_add_filters(), - n::repository_type() = no_config_environment::ncer_ebuild, - n::write_cache() = CommandLine::get_instance()->a_write_cache_dir.argument() - )); - - IDMap results{PackageIDComparator(&env)}; - - unsigned success(0), total(0); - - std::shared_ptr<const CategoryNamePartSet> cat_names(env.main_repository()->category_names({ })); - for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ; - c != c_end ; ++c) - { - if (CommandLine::get_instance()->a_category.specified()) - if (CommandLine::get_instance()->a_category.end_args() == std::find( - CommandLine::get_instance()->a_category.begin_args(), - CommandLine::get_instance()->a_category.end_args(), - stringify(*c))) - continue; - - std::shared_ptr<const QualifiedPackageNameSet> pkg_names(env.main_repository()->package_names(*c, { })); - for (QualifiedPackageNameSet::ConstIterator p(pkg_names->begin()), p_end(pkg_names->end()) ; - p != p_end ; ++p) - { - if (CommandLine::get_instance()->a_package.specified()) - if (CommandLine::get_instance()->a_package.end_args() == std::find( - CommandLine::get_instance()->a_package.begin_args(), - CommandLine::get_instance()->a_package.end_args(), - stringify(p->package()))) - continue; - - const std::shared_ptr<const PackageIDSequence> ids(env[selection::AllVersionsSorted( - generator::Package(*p) & generator::InRepository(env.main_repository()->name()))]); - - cout << "Making manifest for: " << colour(cl_package_name, stringify(*p)) << "..." << endl; - if (fetch_ids(ids, results, success, total) && env.main_repository()->manifest_interface()) - { - try - { - env.main_repository()->manifest_interface()->make_manifest(*p); - } - catch (const MissingDistfileError &) - { - cerr << "Cannot make manifest for: " << colour(cl_package_name, stringify(*p)) << endl; - } - } - else - cerr << "Cannot make manifest for: " << colour(cl_package_name, stringify(*p)) << endl; - } - - } - - cout << colour(cl_heading, "Appareo results for ") << colour(cl_repository_name, env.main_repository()->name()) - << ": " << total << " IDs, " << success << " successes, " << (total - success) << " failures" << endl << endl; - - int exit_status(0); - std::shared_ptr<const PackageID> old_id; - for (IDMap::const_iterator r(results.begin()), r_end(results.end()) ; r != r_end ; ++r) - { - exit_status |= 1; - if ((! old_id) || (*old_id != *r->first)) - { - cout << colour(cl_package_name, stringify(*r->first)) << ":" << endl; - old_id = r->first; - } - cout << " " << r->second << endl; - } - cout << endl; - - return exit_status; - } - } - catch (const 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/appareo/command_line.cc b/src/clients/appareo/command_line.cc deleted file mode 100644 index 356bf81fc..000000000 --- a/src/clients/appareo/command_line.cc +++ /dev/null @@ -1,96 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2009 Kim Højgaard-Hansen - * 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 Singleton<CommandLine>; - -CommandLine::CommandLine() : - ArgsHandler(), - - action_args(main_options_section(), "Actions", - "Selects which basic action to perform. Exactly one action should " - "be specified."), - a_manifest(&action_args, "manifest", 'm', "Create manifest file", 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_repository_directory(&general_args, "repository-dir", 'D', - "Where to find the repository (default: current directory)"), - a_download_directory(&general_args, "download-dir", 'd', - "Where to place downloaded files"), - a_master_repository_name(&general_args, "master-repository-name", '\0', - "Use the specified name for the master repository. Specify the location using --extra-repository-dir. " - "Only for repositories with no metadata/layout.conf."), - a_extra_repository_dir(&general_args, "extra-repository-dir", '\0', - "Also include the repository at this location. May be specified multiple times, in creation order."), - a_write_cache_dir(&general_args, "write-cache-dir", '\0', - "Use a subdirectory named for the repository name under the specified directory for repository write cache"), - a_report_file(&general_args, "report-file", 'r', - "Write report to the specified file, rather than stdout"), - a_override(&general_args, "override", '\0', "Override Manifest if distfile's checksum does not match with it", false), - tree_args(main_options_section(), "Tree action options", - "Options which are relevant for tree actions."), - a_category(&tree_args, "category", 'C', - "Matches with this category name only (may be specified multiple times)"), - a_package(&tree_args, "package", 'P', - "Matches with this package name only (may be specified multiple times)") -{ - add_usage_line("--manifest"); - - add_description_line("appareo is configured purely from the command line. It does not use any user " - "configuration files."); -} - -std::string -CommandLine::app_name() const -{ - return "appareo"; -} - -std::string -CommandLine::app_synopsis() const -{ - return "Manifest client for Paludis"; -} - -std::string -CommandLine::app_description() const -{ - return - "Appareo is a manifest creation client for Paludis. It fetches the distfile(s) for the specified package(s), " - "category or categories or repository, creates manifest files for these and produces a report of any failures."; -} - -CommandLine::~CommandLine() -{ -} - - diff --git a/src/clients/appareo/command_line.hh b/src/clients/appareo/command_line.hh deleted file mode 100644 index c37b47ec5..000000000 --- a/src/clients/appareo/command_line.hh +++ /dev/null @@ -1,70 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2009 Kim Højgaard-Hansen - * 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_APPAREO_COMMAND_LINE_HH -#define PALUDIS_GUARD_SRC_CLIENTS_APPAREO_COMMAND_LINE_HH 1 - -#include <paludis/args/args.hh> -#include <paludis/util/singleton.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_manifest; - 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_repository_directory; - paludis::args::StringArg a_download_directory; - paludis::args::StringArg a_master_repository_name; - paludis::args::StringSequenceArg a_extra_repository_dir; - paludis::args::StringArg a_write_cache_dir; - paludis::args::StringArg a_report_file; - paludis::args::SwitchArg a_override; - - paludis::args::ArgsGroup tree_args; - paludis::args::StringSetArg a_category; - paludis::args::StringSetArg a_package; -}; - - -#endif diff --git a/src/clients/appareo/help_TEST b/src/clients/appareo/help_TEST deleted file mode 100755 index 73bf9eeb0..000000000 --- a/src/clients/appareo/help_TEST +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -./appareo --help - diff --git a/src/clients/appareo/man_appareo.cc b/src/clients/appareo/man_appareo.cc deleted file mode 100644 index 036157082..000000000 --- a/src/clients/appareo/man_appareo.cc +++ /dev/null @@ -1,64 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2009 Kim Højgaard-Hansen - * - * 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 <paludis/args/do_help.hh> - -#include <iostream> -#include <cstdlib> - -using std::cout; -using std::endl; - -namespace -{ - struct ManCommandLine : - paludis::args::ArgsHandler - { - 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, "", "", ""); - - auto w(std::make_shared<paludis::args::AsciidocWriter>(cout)); - - paludis::args::generate_doc(*w, CommandLine::get_instance()); - - return EXIT_SUCCESS; -} - diff --git a/src/clients/appareo/version_TEST b/src/clients/appareo/version_TEST deleted file mode 100755 index bf22c1476..000000000 --- a/src/clients/appareo/version_TEST +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -./appareo --version - |