mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 22:40:12 +01:00
Add --quiet option, restricting output to warnings/errors
This commit is contained in:
parent
5920d636dc
commit
37dda9414c
6
fdroid
6
fdroid
@ -63,9 +63,15 @@ def main():
|
||||
sys.exit(1)
|
||||
|
||||
verbose = any(s in sys.argv for s in ['-v', '--verbose'])
|
||||
quiet = any(s in sys.argv for s in ['-q', '--quiet'])
|
||||
if verbose and quiet:
|
||||
print "Specifying verbose and quiet and the same time is silly"
|
||||
sys.exit(1)
|
||||
|
||||
if verbose:
|
||||
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
|
||||
elif quiet:
|
||||
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.WARN)
|
||||
else:
|
||||
logging.basicConfig(format='%(message)s', level=logging.INFO)
|
||||
|
||||
|
@ -776,6 +776,8 @@ def parse_commandline():
|
||||
parser = OptionParser(usage="Usage: %prog [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]")
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
parser.add_option("-l", "--latest", action="store_true", default=False,
|
||||
help="Build only the latest version of each package")
|
||||
parser.add_option("-s", "--stop", action="store_true", default=False,
|
||||
|
@ -293,6 +293,8 @@ def main():
|
||||
parser = OptionParser(usage="Usage: %prog [options] [APPID [APPID ...]]")
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
parser.add_option("--auto", action="store_true", default=False,
|
||||
help="Process auto-updates")
|
||||
parser.add_option("--autoonly", action="store_true", default=False,
|
||||
|
@ -96,6 +96,8 @@ def main():
|
||||
parser = OptionParser()
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
parser.add_option("-u", "--url", default=None,
|
||||
help="Project URL to import from.")
|
||||
parser.add_option("-s", "--subdir", default=None,
|
||||
|
@ -80,6 +80,8 @@ def main():
|
||||
parser = OptionParser()
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
parser.add_option("-d", "--distinguished-name", default=None,
|
||||
help="X.509 'Distiguished Name' used when generating keys")
|
||||
parser.add_option("--keystore", default=None,
|
||||
|
@ -40,6 +40,8 @@ def main():
|
||||
parser = OptionParser(usage="Usage: %prog [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]")
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
config = common.read_config(options)
|
||||
|
@ -33,6 +33,8 @@ def main():
|
||||
parser = OptionParser(usage="Usage: %prog [options] [APPID [APPID ...]]")
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
config = common.read_config(options)
|
||||
|
@ -37,6 +37,8 @@ def main():
|
||||
parser = OptionParser(usage="Usage: %prog [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]")
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
parser.add_option("--nosvn", action="store_true", default=False,
|
||||
help="Skip svn repositories - for test purposes, because they are too slow.")
|
||||
(options, args) = parser.parse_args()
|
||||
|
@ -36,6 +36,8 @@ def main():
|
||||
parser = OptionParser()
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
config = common.read_config(options)
|
||||
|
@ -49,6 +49,8 @@ def main():
|
||||
parser = OptionParser()
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
parser.add_option("-d", "--download", action="store_true", default=False,
|
||||
help="Download logs we don't have")
|
||||
parser.add_option("--nologs", action="store_true", default=False,
|
||||
|
@ -357,8 +357,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
||||
|
||||
else:
|
||||
|
||||
if not options.quiet:
|
||||
logging.info("Processing " + apkfilename)
|
||||
logging.info("Processing " + apkfilename)
|
||||
thisinfo = {}
|
||||
thisinfo['apkname'] = apkfilename
|
||||
srcfilename = apkfilename[:-4] + "_src.tar.gz"
|
||||
@ -786,9 +785,8 @@ def make_index(apps, apks, repodir, archive, categories):
|
||||
|
||||
if config['repo_keyalias'] is not None:
|
||||
|
||||
if not options.quiet:
|
||||
logging.info("Creating signed index.")
|
||||
logging.info("Key fingerprint: %s" % repo_pubkey_fingerprint)
|
||||
logging.info("Creating signed index.")
|
||||
logging.info("Key fingerprint: %s" % repo_pubkey_fingerprint)
|
||||
|
||||
#Create a jar of the index...
|
||||
p = FDroidPopen(['jar', 'cf', 'index.jar', 'index.xml'], cwd=repodir)
|
||||
@ -864,7 +862,7 @@ def main():
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="No output, except for warnings and errors")
|
||||
help="Restrict output to warnings and errors")
|
||||
parser.add_option("-b", "--buildreport", action="store_true", default=False,
|
||||
help="Report on build data status")
|
||||
parser.add_option("-i", "--interactive", default=False, action="store_true",
|
||||
|
@ -39,6 +39,8 @@ def main():
|
||||
parser = OptionParser(usage="Usage: %prog [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]")
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||
help="Restrict output to warnings and errors")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
config = common.read_config(options)
|
||||
|
Loading…
Reference in New Issue
Block a user