From f74d99c6a78caafdc6e32d8cb135683b7154795c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 28 May 2016 15:40:59 +0200 Subject: 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. --- apt-private/private-cmndline.cc | 10 +++++++++- apt-private/private-cmndline.h | 1 + apt-private/private-main.cc | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'apt-private') 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 &Args, char return true; } /*}}}*/ +static bool addArgumentsAPTInternalPlaner(std::vector &, char const * const)/*{{{*/ +{ + return true; +} + /*}}}*/ static bool addArgumentsAPTInternalSolver(std::vector &, char const * const)/*{{{*/ { return true; @@ -356,6 +361,7 @@ std::vector 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"); -- cgit v1.2.3