]> git.decadent.org.uk Git - dak.git/blobdiff - tools/debianqueued-0.9/debianqueued
Use more https://
[dak.git] / tools / debianqueued-0.9 / debianqueued
index 0015867ab65d4160b8552cbe731b8d2684758185..5702e5c594eb390b940994104397fd9089e947c8 100755 (executable)
@@ -14,6 +14,7 @@
 #
 
 require 5.002;
+no lib '.';
 use strict;
 use POSIX;
 use POSIX qw( strftime sys_stat_h sys_wait_h signal_h );
@@ -26,6 +27,7 @@ use File::Copy;
 use Digest::MD5;
 
 setlocale(&POSIX::LC_ALL, "C");
+$ENV{"LC_ALL"} = "C";
 
 # ---------------------------------------------------------------------------
 #                                                              configuration
@@ -919,9 +921,7 @@ outer_loop: while (<CHANGES>) {
     return;
   } ## end if ( $retries > 0 && (...
 
-  if ( $conf::upload_method eq "ftp" ) {
-    return if !ftp_open();
-  }
+  return if !ftp_open();
 
   # check if the job is already present on target
   # (moved to here, to avoid bothering target as long as there are errors in
@@ -1067,6 +1067,8 @@ sub process_dak_commands {
   }
   msg("log,mail", "(PGP/GnuPG signature by $signator)\n");
 
+  return if !ftp_open();
+
   # check target
   my @filenames = ($commands);
   if (my $ls_l = is_on_target($commands, @filenames)) {
@@ -1095,7 +1097,7 @@ sub process_commands($) {
   my $commands = shift;
   my ( @cmds, $cmd, $pgplines, $signator );
   local (*COMMANDS);
-  my ( @files, $file, @removed, $target_delay );
+  my ($file, @removed, $target_delay );
 
   format_status_str( $main::current_changes, $commands );
   $main::dstat = "c";
@@ -1188,6 +1190,7 @@ outer_loop: while (<COMMANDS>) {
     next if @word < 1;
 
     if ( $word[0] eq "rm" ) {
+      my @files = ();
       foreach ( @word[ 1 .. $#word ] ) {
         my $origword = $_;
         if (m,^DELAYED/([0-9]+)-day/,) {
@@ -1932,6 +1935,7 @@ sub send_status() {
 # open FTP connection to target host if not already open
 #
 sub ftp_open() {
+  return 1 unless $conf::upload_method eq "ftp";
 
   if ($main::FTP_chan) {
 
@@ -2290,6 +2294,8 @@ Subject: $subject
 Date: $date
 X-Debian: DAK
 X-DAK: DAK
+Precedence: bulk
+Auto-Submitted: auto-generated
 __MESSAGE__
 
   if ( length $package ) {