From dadf7a5b46f08b59c7e15a40937a9039ef273d63 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 19 Feb 2013 16:56:31 +0100 Subject: [PATCH] build-remote: Use the --quiet flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘--option verbosity 0’ doesn't actually do anything. --- scripts/build-remote.pl.in | 2 +- src/libmain/shared.cc | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in index 03cd21e97..dddd9e959 100755 --- a/scripts/build-remote.pl.in +++ b/scripts/build-remote.pl.in @@ -259,7 +259,7 @@ close UPLOADLOCK; # Perform the build. my $buildFlags = "--max-silent-time $maxSilentTime --option build-timeout $buildTimeout" - . " --fallback --add-root $rootsDir/\$PPID.out --option verbosity 0" + . " --fallback --add-root $rootsDir/\$PPID.out --quiet" . " --option build-keep-log false"; # We let the remote side kill its process group when the connection is diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index e869ef037..4796629dc 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -168,11 +168,10 @@ static void initAndRun(int argc, char * * argv) remaining.clear(); /* Process default options. */ - int verbosityDelta = lvlInfo; for (Strings::iterator i = args.begin(); i != args.end(); ++i) { string arg = *i; - if (arg == "--verbose" || arg == "-v") verbosityDelta++; - else if (arg == "--quiet") verbosityDelta--; + if (arg == "--verbose" || arg == "-v") verbosity = (Verbosity) (verbosity + 1); + else if (arg == "--quiet") verbosity = verbosity > lvlError ? (Verbosity) (verbosity - 1) : lvlError; else if (arg == "--log-type") { string s = getArg(arg, i, args.end()); setLogType(s); @@ -219,8 +218,6 @@ static void initAndRun(int argc, char * * argv) else remaining.push_back(arg); } - verbosity = (Verbosity) (verbosityDelta < 0 ? 0 : verbosityDelta); - settings.update(); run(remaining);