From 85f9a2650850b181208492de61822cf840ee62e5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 23 Apr 2024 06:10:52 +0200 Subject: Merging upstream version 2.9.2. Signed-off-by: Daniel Baumann --- apt-private/private-cmndline.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'apt-private/private-cmndline.cc') diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 3d6816d..b05ec89 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -246,10 +246,8 @@ static bool addArgumentsAPTGet(std::vector &Args, char const } else if (CmdMatches("clean", "autoclean", "auto-clean", "distclean", "dist-clean", "check", "download", "changelog") || CmdMatches("markauto", "unmarkauto")) // deprecated commands - ; - else if (CmdMatches("moo")) - addArg(0, "color", "APT::Moo::Color", 0); - + { + } if (CmdMatches("install", "reinstall", "remove", "purge", "upgrade", "dist-upgrade", "dselect-upgrade", "autoremove", "auto-remove", "autopurge", "check", "clean", "autoclean", "auto-clean", "distclean", "dist-clean", @@ -409,7 +407,9 @@ std::vector getCommandArgs(APT_CMD const Program, char const addArg('h', "help", "help", 0); addArg('v', "version", "version", 0); // general options + addArg(0, "color", "APT::Color", 0); addArg('q', "quiet", "quiet", CommandLine::IntLevel); + addArg(0, "audit", "APT::Audit", 0); addArg('q', "silent", "quiet", CommandLine::IntLevel); addArg('c', "config-file", 0, CommandLine::ConfigFile); addArg('o', "option", 0, CommandLine::ArbItem); @@ -487,8 +487,8 @@ static void BinarySpecificConfiguration(char const * const Binary) /*{{{*/ } if (binary == "apt" || binary == "apt-config") { - if (getenv("NO_COLOR") == nullptr) - _config->CndSet("Binary::apt::APT::Color", true); + if (getenv("NO_COLOR") == nullptr && getenv("APT_NO_COLOR") == nullptr) + _config->CndSet("Binary::apt::APT::Color", true); _config->CndSet("Binary::apt::APT::Output-Version", 30); _config->CndSet("Binary::apt::APT::Cache::Show::Version", 2); _config->CndSet("Binary::apt::APT::Cache::AllVersions", false); @@ -602,10 +602,12 @@ unsigned short DispatchCommandLine(CommandLine &CmdL, std::vectorPendingError(); - if (_config->FindI("quiet",0) > 0) + if (_config->FindB("APT::Audit")) + _error->DumpErrors(GlobalError::AUDIT); + else if (_config->FindI("quiet",0) > 0) _error->DumpErrors(); else - _error->DumpErrors(GlobalError::DEBUG); + _error->DumpErrors(GlobalError::NOTICE); if (returned == false) return 100; return Errors == true ? 100 : 0; -- cgit v1.2.3