From: Stephen Gran Date: Sat, 10 May 2008 18:08:15 +0000 (+0100) Subject: Quiet perl warnings. Ganneff: this means changing config - I tried to stay X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b83d9299abd33a580b8b4ebf6aff4f4281b34541;p=dak Quiet perl warnings. Ganneff: this means changing config - I tried to stay away from that the first time around, since I wanted to ignore some values that no longer matter, but now I'm reusing them so we don't get 'variable only used once' warnings. --- diff --git a/tools/debianqueued-0.9/config b/tools/debianqueued-0.9/config index bc432459..f2daa77e 100644 --- a/tools/debianqueued-0.9/config +++ b/tools/debianqueued-0.9/config @@ -73,7 +73,7 @@ $scp = "/usr/bin/scp"; $ssh_agent = "/usr/bin/ssh-agent"; $ssh_add = "/usr/bin/ssh-add"; $md5sum = "/usr/bin/md5sum"; -$mail = "/usr/bin/mail"; +$mail = "/usr/sbin/sendmail"; $mkfifo = "/usr/bin/mkfifo"; $tar = "/bin/tar"; # must be GNU tar! $gzip = "/bin/gzip"; diff --git a/tools/debianqueued-0.9/debianqueued b/tools/debianqueued-0.9/debianqueued index c4dec406..c2f282d3 100755 --- a/tools/debianqueued-0.9/debianqueued +++ b/tools/debianqueued-0.9/debianqueued @@ -276,6 +276,7 @@ $junk = $conf::no_changes_timeout; $junk = @conf::nonus_packages; $junk = @conf::test_binaries; $junk = @conf::maintainer_mail; +$junk = $conf::mail ||= '/usr/sbin/sendmail'; $conf::target = "localhost" if $conf::upload_method eq "copy"; package main; @@ -2090,7 +2091,6 @@ sub init_mail(;$) { # then send out # sub finish_mail() { - local( *MAIL ); debug( "No mail for $main::mail_addr" ) if $main::mail_addr && !$main::mail_text; @@ -2127,7 +2127,10 @@ sub send_mail($$$) { my $package = keys %main::packages ? join(' ', keys %main::packages) : ""; use Email::Send; - $Email::Send::Sendmail::SENDMAIL = '/usr/sbin/sendmail'; + + unless (defined($Email::Send::Sendmail::SENDMAIL)) { + $Email::Send::Sendmail::SENDMAIL = $conf::mail; + } my $message = <<__MESSAGE__; To: $addr