chiark / gitweb /
fix PEP9 E713 test for membership should be 'not in'
[fdroidserver.git] / fdroidserver / signindex.py
index e3645278f94729ed4c955e3b55bd3de3c688ff1c..1d0c320067714f1f1c25d8cc79ba75e075f1d222 100644 (file)
@@ -35,14 +35,15 @@ def main():
 
     # Parse command line...
     parser = ArgumentParser(usage="%(prog)s [options]")
-    parser.add_argument("-v", "--verbose", action="store_true", default=False,
-                        help="Spew out even more information than normal")
-    parser.add_argument("-q", "--quiet", action="store_true", default=False,
-                        help="Restrict output to warnings and errors")
+    common.setup_global_opts(parser)
     options = parser.parse_args()
 
     config = common.read_config(options)
 
+    if 'jarsigner' not in config:
+        logging.critical('Java jarsigner not found! Install in standard location or set java_paths!')
+        sys.exit(1)
+
     repodirs = ['repo']
     if config['archive_older'] != 0:
         repodirs.append('archive')
@@ -56,9 +57,9 @@ def main():
         unsigned = os.path.join(output_dir, 'index_unsigned.jar')
         if os.path.exists(unsigned):
 
-            args = ['jarsigner', '-keystore', config['keystore'],
+            args = [config['jarsigner'], '-keystore', config['keystore'],
                     '-storepass:file', config['keystorepassfile'],
-                    '-digestalg', 'SHA1', '-sigalg', 'MD5withRSA',
+                    '-digestalg', 'SHA1', '-sigalg', 'SHA1withRSA',
                     unsigned, config['repo_keyalias']]
             if config['keystore'] == 'NONE':
                 args += config['smartcardoptions']