[csw-devel] SF.net SVN: opencsw:[409] catalog_signatures
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Thu Jul 21 05:01:50 CEST 2011
Revision: 409
http://opencsw.svn.sourceforge.net/opencsw/?rev=409&view=rev
Author: bdwalton
Date: 2011-07-21 03:01:50 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
move constants defining valid path portions for where to find the catalog out of the library (these should leverage CSW::Constants in the future)
Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>
Modified Paths:
--------------
catalog_signatures/catalog_gpg
catalog_signatures/lib/csw/gpg_daemon.rb
Modified: catalog_signatures/catalog_gpg
===================================================================
--- catalog_signatures/catalog_gpg 2011-07-21 03:01:24 UTC (rev 408)
+++ catalog_signatures/catalog_gpg 2011-07-21 03:01:50 UTC (rev 409)
@@ -4,6 +4,10 @@
require 'optparse'
require 'ostruct'
+VALID_TREES = %w(unstable current)
+VALID_ARCHES = %w(i386 sparc)
+VALID_RELEASES = %w(5.9 5.10 5.11)
+
begin
retried = nil
require 'csw/gpg_daemon'
Modified: catalog_signatures/lib/csw/gpg_daemon.rb
===================================================================
--- catalog_signatures/lib/csw/gpg_daemon.rb 2011-07-21 03:01:24 UTC (rev 408)
+++ catalog_signatures/lib/csw/gpg_daemon.rb 2011-07-21 03:01:50 UTC (rev 409)
@@ -1,10 +1,6 @@
require 'webrick'
class GPGDaemon < WEBrick::HTTPServlet::AbstractServlet
- VALID_TREES = %w(unstable current)
- VALID_ARCHES = %w(i386 sparc)
- VALID_RELEASE = %w(5.9 5.10 5.11)
-
def initialize(server, mirror_path)
@mirror_path = mirror_path
@gpg = "gpg --batch --yes --no-tty -a --output /dev/stdout"
@@ -42,9 +38,6 @@
cat_file = File.join(@mirror_path, path, 'catalog')
return false unless parts.size.eql?(3)
- return false unless VALID_TREES.include?(parts[0])
- return false unless VALID_ARCHES.include?(parts[1])
- return false unless VALID_RELEASE.include?(parts[2])
begin
cat_stat = File.stat(cat_file)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list