chiark / gitweb /
make FDroidPopen output based on --verbose
authorHans-Christoph Steiner <hans@eds.org>
Mon, 2 Jun 2014 20:12:50 +0000 (16:12 -0400)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 5 Jun 2014 02:01:25 +0000 (22:01 -0400)
FDroidPopen outputs by default, this should be controlled by the --verbose
flag so that most of the time, only meaningful messages are shown like
errors and such.  For command output that should be shown everytime,
output=True can be set.

fdroidserver/common.py
fdroidserver/update.py

index a5e9bd09bc699d7f17488a4c995784a1645931f0..81675657a8401bd1bc893a7a79146b8018075134 100644 (file)
@@ -1531,7 +1531,7 @@ def SilentPopen(commands, cwd=None, shell=False):
     return FDroidPopen(commands, cwd=cwd, shell=shell, output=False)
 
 
-def FDroidPopen(commands, cwd=None, shell=False, output=True):
+def FDroidPopen(commands, cwd=None, shell=False, output=False):
     """
     Run a command and capture the possibly huge output.
 
@@ -1558,7 +1558,7 @@ def FDroidPopen(commands, cwd=None, shell=False, output=True):
     while not stdout_reader.eof():
         while not stdout_queue.empty():
             line = stdout_queue.get()
-            if output and options.verbose:
+            if output or options.verbose:
                 # Output directly to console
                 sys.stdout.write(line)
                 sys.stdout.flush()
index 0f7d7a9db79d8b380bc6715553582926868bbfce..d7e93fcf1f886cc52b3e973050dee397a9efb947 100644 (file)
@@ -363,8 +363,8 @@ def scan_apks(apps, apkcache, repodir, knownapks):
             thisinfo = apkcache[apkfilename]
 
         else:
-
-            logging.info("Processing " + apkfilename)
+            if options.verbose:
+                logging.info("Processing " + apkfilename)
             thisinfo = {}
             thisinfo['apkname'] = apkfilename
             srcfilename = apkfilename[:-4] + "_src.tar.gz"
@@ -801,8 +801,8 @@ def make_index(apps, apks, repodir, archive, categories):
 
     if 'repo_keyalias' in config:
 
-        logging.info("Creating signed index with this key:")
-        logging.info("SHA256: %s" % repo_pubkey_fingerprint)
+        logging.info("Creating signed index with this key (SHA256):")
+        logging.info("%s" % repo_pubkey_fingerprint)
 
         # Create a jar of the index...
         p = FDroidPopen(['jar', 'cf', 'index.jar', 'index.xml'], cwd=repodir)