[Dehs-devel] SVN devscripts commit: r264 - in trunk: . debian

Julian Gilbey jdg at costa.debian.org
Sun Oct 23 02:01:36 UTC 2005


Author: jdg
Date: 2005-10-23 02:01:34 +0000 (Sun, 23 Oct 2005)
New Revision: 264

Modified:
   trunk/debian/changelog
   trunk/uscan.1
   trunk/uscan.pl
Log:
Cleanup timeout code

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2005-10-22 12:23:43 UTC (rev 263)
+++ trunk/debian/changelog	2005-10-23 02:01:34 UTC (rev 264)
@@ -1,4 +1,4 @@
-devscripts (2.9.9) unstable; urgency=low
+devscripts (2.9.9) UNRELEASED; urgency=low
 
   * uscan: add option to set LWP timeout, patch by Stephen Quinney 
     (Closes: #335181) 

Modified: trunk/uscan.1
===================================================================
--- trunk/uscan.1	2005-10-22 12:23:43 UTC (rev 263)
+++ trunk/uscan.1	2005-10-23 02:01:34 UTC (rev 264)
@@ -285,7 +285,7 @@
 .B \-\-no\-pasv
 Do not use PASV mode for FTP connections.
 .TP
-.B \-\-timeout N
+\fB\-\-timeout\fR \fIN\fR
 Set timeout to N seconds (default 20 seconds).
 .TP
 .B \-\-symlink

Modified: trunk/uscan.pl
===================================================================
--- trunk/uscan.pl	2005-10-22 12:23:43 UTC (rev 263)
+++ trunk/uscan.pl	2005-10-23 02:01:34 UTC (rev 264)
@@ -155,7 +155,7 @@
 } else {
     my @config_files = ('/etc/devscripts.conf', '~/.devscripts');
     my %config_vars = (
-               'USCAN_TIMEOUT' => 20,
+		       'USCAN_TIMEOUT' => 20,
 		       'USCAN_DOWNLOAD' => 'yes',
 		       'USCAN_PASV' => 'default',
 		       'USCAN_SYMLINK' => 'symlink',
@@ -184,7 +184,7 @@
     $config_vars{'USCAN_PASV'} =~ /^(yes|no|default)$/
 	or $config_vars{'USCAN_PASV'}='default';
     $config_vars{'USCAN_TIMEOUT'} =~ m/^\d+$/
-    or $config_vars{'USCAN_TIMEOUT'}=20;
+	or $config_vars{'USCAN_TIMEOUT'}=20;
     $config_vars{'USCAN_SYMLINK'} =~ /^(yes|no|symlinks?|rename)$/
 	or $config_vars{'USCAN_SYMLINK'}='yes';
     $config_vars{'USCAN_SYMLINK'}='symlink'
@@ -196,6 +196,7 @@
 	or $config_vars{'USCAN_DEHS_OUTPUT'}='no';
     $config_vars{'DEVSCRIPTS_CHECK_DIRNAME_LEVEL'} =~ /^[012]$/
 	or $config_vars{'DEVSCRIPTS_CHECK_DIRNAME_LEVEL'}=1;
+
     foreach my $var (sort keys %config_vars) {
 	if ($config_vars{$var} ne $config_default{$var}) {
 	    $modified_conf_msg .= "  $var=$config_vars{$var}\n";
@@ -227,7 +228,7 @@
 	   "report" => sub { $opt_download = 0; },
 	   "report-status" => sub { $opt_download = 0; $opt_report = 1; },
 	   "passive|pasv!" => \$opt_passive,
-       "timeout=i" => \$opt_timeout,
+	   "timeout=i" => \$opt_timeout,
 	   "symlink!" => sub { $opt_symlink = $_[1] ? 'symlink' : 'no'; },
 	   "rename" => sub { $opt_symlink = 'rename'; },
 	   "package=s" => \$opt_package,
@@ -256,6 +257,7 @@
 $report = $opt_report if defined $opt_report;
 $passive = $opt_passive if defined $opt_passive;
 $timeout = $opt_timeout if defined $opt_timeout;
+$timeout = 20 unless defined $timeout and $timeout > 0;
 $symlink = $opt_symlink if defined $opt_symlink;
 $verbose = $opt_verbose if defined $opt_verbose;
 $dehs = $opt_dehs if defined $opt_dehs;




More information about the Dehs-devel mailing list