From 385d9f2f23057bc5808b5e013e77ba16d1c94da4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 7 Jun 2016 17:01:33 +0200 Subject: edsp: optionally store a compressed copy of the last scenario For bugreports and co it could be handy to have the scenario and all the settings used in it around later for inspection for EDSP like protocols. EDSP might not be the most interesting as the user can still interrupt the process before the solution is applied and users tend to have an opinion on the "rightness" of a solution, so it is disabled by default. --- apt-private/private-cmndline.cc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'apt-private/private-cmndline.cc') diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 7e50b1401..135ee3c4e 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -128,6 +128,11 @@ static bool addArgumentsAPTConfig(std::vector &Args, char con else return false; + return true; +} + /*}}}*/ +static bool addArgumentsAPTDumpSolver(std::vector &, char const * const)/*{{{*/ +{ return true; } /*}}}*/ @@ -347,6 +352,7 @@ std::vector getCommandArgs(APT_CMD const Program, char const case APT_CMD::APT_CACHE: addArgumentsAPTCache(Args, Cmd); break; case APT_CMD::APT_CDROM: addArgumentsAPTCDROM(Args, Cmd); break; case APT_CMD::APT_CONFIG: addArgumentsAPTConfig(Args, Cmd); break; + case APT_CMD::APT_DUMP_SOLVER: addArgumentsAPTDumpSolver(Args, Cmd); break; 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; @@ -402,6 +408,7 @@ static bool ShowCommonHelp(APT_CMD const Binary, CommandLine &CmdL, std::vector< case APT_CMD::APT_CACHE: cmd = "apt-cache(8)"; break; case APT_CMD::APT_CDROM: cmd = "apt-cdrom(8)"; break; case APT_CMD::APT_CONFIG: cmd = "apt-config(8)"; break; + case APT_CMD::APT_DUMP_SOLVER: cmd = nullptr; break; case APT_CMD::APT_EXTRACTTEMPLATES: cmd = "apt-extracttemplates(1)"; break; case APT_CMD::APT_FTPARCHIVE: cmd = "apt-ftparchive(1)"; break; case APT_CMD::APT_GET: cmd = "apt-get(8)"; break; @@ -412,14 +419,15 @@ static bool ShowCommonHelp(APT_CMD const Binary, CommandLine &CmdL, std::vector< } if (cmd != nullptr) ioprintf(std::cout, _("See %s for more information about the available commands."), cmd); - 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" - "Package and version choices can be expressed via apt_preferences(5).\n" - "Security details are available in apt-secure(8).\n"); + if (Binary != APT_CMD::APT_DUMP_SOLVER && Binary != APT_CMD::APT_INTERNAL_SOLVER) + 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" + "Package and version choices can be expressed via apt_preferences(5).\n" + "Security details are available in apt-secure(8).\n"); if (Binary == APT_CMD::APT_GET || Binary == APT_CMD::APT) std::cout << std::right << std::setw(70) << _("This APT has Super Cow Powers.") << std::endl; - else if (Binary == APT_CMD::APT_HELPER) + else if (Binary == APT_CMD::APT_HELPER || Binary == APT_CMD::APT_DUMP_SOLVER) std::cout << std::right << std::setw(70) << _("This APT helper has Super Meep Powers.") << std::endl; return true; } -- cgit v1.2.3