chiark / gitweb /
make repo_keyalias like a config option: leave it commented out
authorHans-Christoph Steiner <hans@eds.org>
Fri, 4 Apr 2014 01:44:40 +0000 (21:44 -0400)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 7 Apr 2014 20:00:18 +0000 (16:00 -0400)
Before, the code relies on repo_keyalias being None, which does not feel
conffile-like.  Now, its commented out if its not set.

examples/config.py
fdroidserver/update.py

index 8eb1f266935a505e3287ff2f292f697df45d4692..3aa837f96a29c699e49da92dd46aa793c33d91f4 100644 (file)
@@ -54,9 +54,10 @@ of applications from the main repository.
 """
 
 
-#The key (from the keystore defined below) to be used for signing the
-#repository itself. Can be None for an unsigned repository.
-repo_keyalias = None
+# The key (from the keystore defined below) to be used for signing the
+# repository itself.  This is the same name you would give to keytool or
+# jarsigner using -alias.  (Not needed in an unsigned repository).
+#repo_keyalias = "fdroidrepo"
 
 #The keystore to use for release keys when building. This needs to be
 #somewhere safe and secure, and backed up!
index 6e54bbc0b6dd2d3f97433c173cf28d8274c10017..fb90c5049a54eb0fcb5887dc50c5c1694401c8b6 100644 (file)
@@ -627,7 +627,7 @@ def make_index(apps, apks, repodir, archive, categories):
     repoel.setAttribute("version", "12")
     repoel.setAttribute("timestamp", str(int(time.time())))
 
-    if config['repo_keyalias']:
+    if 'repo_keyalias' in config:
 
         # Generate a certificate fingerprint the same way keytool does it
         # (but with slightly different formatting)
@@ -783,7 +783,7 @@ def make_index(apps, apks, repodir, archive, categories):
     of.write(output)
     of.close()
 
-    if config['repo_keyalias'] is not None:
+    if 'repo_keyalias' in config:
 
         logging.info("Creating signed index.")
         logging.info("Key fingerprint: %s" % repo_pubkey_fingerprint)