diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-05-28 15:40:59 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-06-27 11:57:12 +0200 |
commit | f74d99c6a78caafdc6e32d8cb135683b7154795c (patch) | |
tree | 3056bcf8fa40dd70c65ae073e634aa142ab8e628 /apt-private | |
parent | dae197476f1831269d13f4e990276ce25c483842 (diff) |
eipp: provide the internal planer as an external one
Testing the current implementation can benefit from being able to be
feed an EIPP request and produce a fully compliant response. It is also
a great test for EIPP in general.
Diffstat (limited to 'apt-private')
-rw-r--r-- | apt-private/private-cmndline.cc | 10 | ||||
-rw-r--r-- | apt-private/private-cmndline.h | 1 | ||||
-rw-r--r-- | apt-private/private-main.cc | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 839b55964..8fb4a48dd 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -160,6 +160,11 @@ static bool addArgumentsAPTFTPArchive(std::vector<CommandLine::Args> &Args, char return true; } /*}}}*/ +static bool addArgumentsAPTInternalPlaner(std::vector<CommandLine::Args> &, char const * const)/*{{{*/ +{ + return true; +} + /*}}}*/ static bool addArgumentsAPTInternalSolver(std::vector<CommandLine::Args> &, char const * const)/*{{{*/ { return true; @@ -356,6 +361,7 @@ std::vector<CommandLine::Args> getCommandArgs(APT_CMD const Program, char const case APT_CMD::APT_EXTRACTTEMPLATES: addArgumentsAPTExtractTemplates(Args, Cmd); break; case APT_CMD::APT_FTPARCHIVE: addArgumentsAPTFTPArchive(Args, Cmd); break; case APT_CMD::APT_HELPER: addArgumentsAPTHelper(Args, Cmd); break; + case APT_CMD::APT_INTERNAL_PLANER: addArgumentsAPTInternalPlaner(Args, Cmd); break; case APT_CMD::APT_INTERNAL_SOLVER: addArgumentsAPTInternalSolver(Args, Cmd); break; case APT_CMD::APT_MARK: addArgumentsAPTMark(Args, Cmd); break; case APT_CMD::APT_SORTPKG: addArgumentsAPTSortPkgs(Args, Cmd); break; @@ -412,13 +418,15 @@ static bool ShowCommonHelp(APT_CMD const Binary, CommandLine &CmdL, std::vector< case APT_CMD::APT_FTPARCHIVE: cmd = "apt-ftparchive(1)"; break; case APT_CMD::APT_GET: cmd = "apt-get(8)"; break; case APT_CMD::APT_HELPER: cmd = nullptr; break; + case APT_CMD::APT_INTERNAL_PLANER: cmd = nullptr; break; case APT_CMD::APT_INTERNAL_SOLVER: cmd = nullptr; break; case APT_CMD::APT_MARK: cmd = "apt-mark(8)"; break; case APT_CMD::APT_SORTPKG: cmd = "apt-sortpkgs(1)"; break; } if (cmd != nullptr) ioprintf(std::cout, _("See %s for more information about the available commands."), cmd); - if (Binary != APT_CMD::APT_DUMP_SOLVER && Binary != APT_CMD::APT_INTERNAL_SOLVER) + if (Binary != APT_CMD::APT_DUMP_SOLVER && Binary != APT_CMD::APT_INTERNAL_SOLVER && + Binary != APT_CMD::APT_INTERNAL_PLANER) std::cout << std::endl << _("Configuration options and syntax is detailed in apt.conf(5).\n" "Information about how to configure sources can be found in sources.list(5).\n" diff --git a/apt-private/private-cmndline.h b/apt-private/private-cmndline.h index c0c5a7455..6882add0c 100644 --- a/apt-private/private-cmndline.h +++ b/apt-private/private-cmndline.h @@ -22,6 +22,7 @@ enum class APT_CMD { APT_MARK, APT_SORTPKG, APT_DUMP_SOLVER, + APT_INTERNAL_PLANER, }; struct aptDispatchWithHelp { diff --git a/apt-private/private-main.cc b/apt-private/private-main.cc index 64f4bc563..6405b71b8 100644 --- a/apt-private/private-main.cc +++ b/apt-private/private-main.cc @@ -38,6 +38,7 @@ void InitLocale(APT_CMD const binary) /*{{{*/ break; case APT_CMD::APT_EXTRACTTEMPLATES: case APT_CMD::APT_FTPARCHIVE: + case APT_CMD::APT_INTERNAL_PLANER: case APT_CMD::APT_INTERNAL_SOLVER: case APT_CMD::APT_SORTPKG: textdomain("apt-utils"); |