From 65beb5720f82845bf175e0cd80f070da21838827 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 25 Jun 2010 20:11:11 +0200 Subject: print all messages if the application is in an interactive run --- cmdline/apt-cache.cc | 12 +++++------- cmdline/apt-cdrom.cc | 12 +++++------- cmdline/apt-get.cc | 12 +++++------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 2332a0f13..a4ec63eed 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1876,13 +1876,11 @@ int main(int argc,const char *argv[]) /*{{{*/ CmdL.DispatchArg(CmdsB); // Print any errors or warnings found during parsing - if (_error->empty() == false) - { - bool Errors = _error->PendingError(); + bool const Errors = _error->PendingError(); + if (_config->FindI("quiet",0) > 0) _error->DumpErrors(); - return Errors == true?100:0; - } - - return 0; + else + _error->DumpErrors(GlobalError::DEBUG); + return Errors == true ? 100 : 0; } /*}}}*/ diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 8b9eacae6..da2ffa390 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -273,13 +273,11 @@ int main(int argc,const char *argv[]) /*{{{*/ CmdL.DispatchArg(Cmds); // Print any errors or warnings found during parsing - if (_error->empty() == false) - { - bool Errors = _error->PendingError(); + bool const Errors = _error->PendingError(); + if (_config->FindI("quiet",0) > 0) _error->DumpErrors(); - return Errors == true?100:0; - } - - return 0; + else + _error->DumpErrors(GlobalError::DEBUG); + return Errors == true ? 100 : 0; } /*}}}*/ diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 6a7d7a448..605eedb0f 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2920,13 +2920,11 @@ int main(int argc,const char *argv[]) /*{{{*/ CmdL.DispatchArg(Cmds); // Print any errors or warnings found during parsing - if (_error->empty() == false) - { - bool Errors = _error->PendingError(); + bool const Errors = _error->PendingError(); + if (_config->FindI("quiet",0) > 0) _error->DumpErrors(); - return Errors == true?100:0; - } - - return 0; + else + _error->DumpErrors(GlobalError::DEBUG); + return Errors == true ? 100 : 0; } /*}}}*/ -- cgit v1.2.3