You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/11/23 20:51:59 UTC

svn commit: r1038302 - /subversion/trunk/tools/dist/collect_sigs.py

Author: danielsh
Date: Tue Nov 23 19:51:59 2010
New Revision: 1038302

URL: http://svn.apache.org/viewvc?rev=1038302&view=rev
Log:
Make the tarballs location configurable.

Will require config changes to be made by: hwright

* tools/dist/collect_sigs.py
  (config.filesdir): New config.
  (files): New helper.
  (default_page, verify_sig): Use config.filesdir.

Modified:
    subversion/trunk/tools/dist/collect_sigs.py

Modified: subversion/trunk/tools/dist/collect_sigs.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/collect_sigs.py?rev=1038302&r1=1038301&r2=1038302&view=diff
==============================================================================
--- subversion/trunk/tools/dist/collect_sigs.py (original)
+++ subversion/trunk/tools/dist/collect_sigs.py Tue Nov 23 19:51:59 2010
@@ -51,6 +51,11 @@ except:
 
 r = re.compile('\[GNUPG\:\] GOODSIG (\w*) (.*)')
 
+def files():
+  for f in os.listdir(config.filesdir):
+    if config.version in f and (f.endswith('.tar.gz') or f.endswith('.zip') or f.endswith('.tar.bz2')):
+      yield f
+
 shell_content = '''
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -81,9 +86,7 @@ File: <select name="filename">
 </form>
 '''
 
-  contents = [f for f in os.listdir('.')
-              if f.endswith('.tar.gz') or f.endswith('.zip')
-                                       or f.endswith('.tar.bz2')]
+  contents = [os.path.basename(x) for x in files()]
   contents.sort()
 
   options = ''
@@ -100,7 +103,8 @@ def save_valid_sig(filename, signature):
 
 def verify_sig(signature, filename):
   args = ['gpg', '--logger-fd', '1', '--no-tty',
-          '--status-fd', '2', '--verify', '-', filename]
+          '--status-fd', '2', '--verify', '-',
+          os.path.join(config.filesdir, filename)]
 
   gpg = subprocess.Popen(args,
                          stdin=subprocess.PIPE,