Report forwarded to debian-bugs-dist@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#44611; Package mirror.
debian-bugs-dist@lists.debian.orgDirk Eddelbuettel
Subject: Bug#44611: Mirror does not return a failure error code if server goes away
Reply-To: Marc Merlin , 44611@bugs.debian.org
Resent-From: Marc Merlin
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: Dirk Eddelbuettel
Resent-Date: Wed, 08 Sep 1999 18:03:18 GMT
Resent-Message-ID:
Resent-Sender: iwj@debian.org
X-Debian-PR-Message: report 44611
X-Debian-PR-Package: mirror
X-Debian-PR-Keywords:
X-Loop: owner@bugs.debian.org
Received: via spool by bugs@bugs.debian.org id=B.93681342712143
(code B ref -1); Wed, 08 Sep 1999 18:03:18 GMT
Date: Wed, 8 Sep 1999 10:57:01 -0700
From: Marc Merlin
To: submit@bugs.debian.org
Message-ID: <19990908105701.D11608@marc.merlins.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.6i
X-Sysadmin: BOFH
X-URL: http://marc.merlins.org/
X-Operating-System: Proudly running Linux 2.2.7-1.18/Debian potato
Package: mirror
Version: 2.9-4
Yet another bug in mirror that I found with my debugging/informational patch
that was part of my first report.
Before:
----------------------------------------------------------------------------
Got contrib/libc6/SRPMS/le-1.5.2-1.src.rpm 308060 45
Failed to get contrib/libc6/SRPMS/klyx-0.9.9-2.src.rpm: remote server gone away
Failed to get file remote server gone away
Fatal error talking to site, skipping rest of transfers
Mirror redhat:redhat.ftp (pid 8311) ended with status: 0
----------------------------------------------------------------------------
After:
----------------------------------------------------------------------------
Got 6.0/i386/XFree86-I128-3.3.5-0.6.0.i386.rpm 944170 84
Failed to get 6.0/i386/XFree86-3.3.5-0.6.0.i386.rpm: remote server gone away
Failed to get file remote server gone away
Mirror redhat:redhat.updates (pid 16598) ended with status: 256
----------------------------------------------------------------------------
Patch for this bug:
----------------------------------------------------------------------------
--- mirror.debian Tue Aug 24 19:18:23 1999
+++ mirror Tue Sep 7 15:53:38 1999
@@ -1377,9 +1377,10 @@
}
&make_dirs();
- &do_all_transfers();
-
- $exit_status = $exit_ok; # Everything went ok.
+ if (&do_all_transfers() != -1)
+ {
+ $exit_status = $exit_ok; # Everything went ok.
+ }
if( $get_file ){
# I must have finished with the remote information
@@ -2685,7 +2686,7 @@
if( $ftp'fatalerror || $timeouts > $max_timeouts ){
&msg( $log, "Fatal error talking to site, skipping rest of transfers\n" );
&disconnect();
- return;
+ return -1;
}
next;
}
----------------------------------------------------------------------------
Full patch including my previous bug report on mirror (bug 44020):
----------------------------------------------------------------------------
--- mirror.debian Tue Aug 24 19:18:23 1999
+++ mirror Tue Sep 7 15:53:38 1999
@@ -731,7 +731,7 @@
$value{ 'get_patt' } = pop( @get_patt );
$value{ 'local_dir' } = '.';
$value{ 'remote_user' } = 'anonymous';
- $exit_status = &do_mirror();
+ &do_mirror();
}
return;
}
@@ -740,7 +740,7 @@
if( $command_line{ 'interactive' } ){
# No config file to read
$value{ 'package' } = 'interactive';
- $exit_status = &do_mirror();
+ &do_mirror();
return;
}
@@ -760,7 +760,7 @@
# Is this a new package?
if( $value{ 'package' } && $key eq 'package' ){
# mirror the existing package
- $exit_status = &do_mirror();
+ &do_mirror();
# reset
&set_defaults();
@@ -786,7 +786,7 @@
# Mirror the last package in the file
if( $value{ 'package' } ){
- $exit_status = &do_mirror();
+ &do_mirror();
}
}
@@ -994,7 +994,7 @@
$skip_till = $limit_packages = 0;
}
- local( $exit_status ) = $exit_fail_noconnect; # Presume the worse.
+ $exit_status = $exit_fail_noconnect; # Presume the worse.
$timeouts = 0;
# set things from the command line arguments
@@ -1377,9 +1377,10 @@
}
&make_dirs();
- &do_all_transfers();
-
- $exit_status = $exit_ok; # Everything went ok.
+ if (&do_all_transfers() != -1)
+ {
+ $exit_status = $exit_ok; # Everything went ok.
+ }
if( $get_file ){
# I must have finished with the remote information
@@ -2685,7 +2686,7 @@
if( $ftp'fatalerror || $timeouts > $max_timeouts ){
&msg( $log, "Fatal error talking to site, skipping rest of transfers\n" );
&disconnect();
- return;
+ return -1;
}
next;
}
@@ -3860,14 +3861,14 @@
{
$sigs ++;
if( $sigs > $max_sigs ){
- exit( 0 );
+ exit( 127 );
}
local( $sig ) = @_;
local( $msg ) = "Caught a SIG$sig shutting down";
local( $package, $filename, $line ) = caller;
warn "$package:$filename:$line $msg";
- exit( 0 );
+ exit( 127 );
}
sub trap_signals
----------------------------------------------------------------------------
Cheers,
Marc
--
Microsoft is to software what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ (friendly to non IE browsers)
Finger marc_f@merlins.org for PGP key and other contact information
Acknowledgement sent to Marc Merlin <marcsoft@merlins.org>:
New bug report received and forwarded. Copy sent to Dirk Eddelbuettel <edd@debian.org>.
-t
From: owner@bugs.debian.org (Debian Bug Tracking System)
To: Marc Merlin
Subject: Bug#44611: Acknowledgement (Mirror does not return a failure error code if server goes away)
Message-ID:
In-Reply-To: <19990908105701.D11608@marc.merlins.org>
References: <19990908105701.D11608@marc.merlins.org>
X-Debian-PR-Message: ack 44611
Thank you for the problem report you have sent regarding Debian.
This is an automatically generated reply, to let you know your message has
been received. It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.
Your message has been sent to the package maintainer(s):
Dirk Eddelbuettel
If you wish to submit further information on your problem, please send
it to 44611@bugs.debian.org (and *not* to
bugs@bugs.debian.org).
Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.
Ian Jackson
(administrator, Debian bugs database)
Received: (at submit) by bugs.debian.org; 8 Sep 1999 17:57:07 +0000
Received: (qmail 12140 invoked from network); 8 Sep 1999 17:57:06 -0000
Received: from magic.magic.metawire.com (HELO magic.merlins.org) (root@204.80.113.97)
by master.debian.org with SMTP; 8 Sep 1999 17:57:06 -0000
Received: (from merlin@localhost)
by magic.merlins.org (8.9.3/8.9.3) id KAA12430
for submit@bugs.debian.org; Wed, 8 Sep 1999 10:57:01 -0700
Date: Wed, 8 Sep 1999 10:57:01 -0700
From: Marc Merlin
To: submit@bugs.debian.org
Subject: Mirror does not return a failure error code if server goes away
Message-ID: <19990908105701.D11608@marc.merlins.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.6i
X-Sysadmin: BOFH
X-URL: http://marc.merlins.org/
X-Operating-System: Proudly running Linux 2.2.7-1.18/Debian potato
Package: mirror
Version: 2.9-4
Yet another bug in mirror that I found with my debugging/informational patch
that was part of my first report.
Before:
----------------------------------------------------------------------------
Got contrib/libc6/SRPMS/le-1.5.2-1.src.rpm 308060 45
Failed to get contrib/libc6/SRPMS/klyx-0.9.9-2.src.rpm: remote server gone away
Failed to get file remote server gone away
Fatal error talking to site, skipping rest of transfers
Mirror redhat:redhat.ftp (pid 8311) ended with status: 0
----------------------------------------------------------------------------
After:
----------------------------------------------------------------------------
Got 6.0/i386/XFree86-I128-3.3.5-0.6.0.i386.rpm 944170 84
Failed to get 6.0/i386/XFree86-3.3.5-0.6.0.i386.rpm: remote server gone away
Failed to get file remote server gone away
Mirror redhat:redhat.updates (pid 16598) ended with status: 256
----------------------------------------------------------------------------
Patch for this bug:
----------------------------------------------------------------------------
--- mirror.debian Tue Aug 24 19:18:23 1999
+++ mirror Tue Sep 7 15:53:38 1999
@@ -1377,9 +1377,10 @@
}
&make_dirs();
- &do_all_transfers();
-
- $exit_status = $exit_ok; # Everything went ok.
+ if (&do_all_transfers() != -1)
+ {
+ $exit_status = $exit_ok; # Everything went ok.
+ }
if( $get_file ){
# I must have finished with the remote information
@@ -2685,7 +2686,7 @@
if( $ftp'fatalerror || $timeouts > $max_timeouts ){
&msg( $log, "Fatal error talking to site, skipping rest of transfers\n" );
&disconnect();
- return;
+ return -1;
}
next;
}
----------------------------------------------------------------------------
Full patch including my previous bug report on mirror (bug 44020):
----------------------------------------------------------------------------
--- mirror.debian Tue Aug 24 19:18:23 1999
+++ mirror Tue Sep 7 15:53:38 1999
@@ -731,7 +731,7 @@
$value{ 'get_patt' } = pop( @get_patt );
$value{ 'local_dir' } = '.';
$value{ 'remote_user' } = 'anonymous';
- $exit_status = &do_mirror();
+ &do_mirror();
}
return;
}
@@ -740,7 +740,7 @@
if( $command_line{ 'interactive' } ){
# No config file to read
$value{ 'package' } = 'interactive';
- $exit_status = &do_mirror();
+ &do_mirror();
return;
}
@@ -760,7 +760,7 @@
# Is this a new package?
if( $value{ 'package' } && $key eq 'package' ){
# mirror the existing package
- $exit_status = &do_mirror();
+ &do_mirror();
# reset
&set_defaults();
@@ -786,7 +786,7 @@
# Mirror the last package in the file
if( $value{ 'package' } ){
- $exit_status = &do_mirror();
+ &do_mirror();
}
}
@@ -994,7 +994,7 @@
$skip_till = $limit_packages = 0;
}
- local( $exit_status ) = $exit_fail_noconnect; # Presume the worse.
+ $exit_status = $exit_fail_noconnect; # Presume the worse.
$timeouts = 0;
# set things from the command line arguments
@@ -1377,9 +1377,10 @@
}
&make_dirs();
- &do_all_transfers();
-
- $exit_status = $exit_ok; # Everything went ok.
+ if (&do_all_transfers() != -1)
+ {
+ $exit_status = $exit_ok; # Everything went ok.
+ }
if( $get_file ){
# I must have finished with the remote information
@@ -2685,7 +2686,7 @@
if( $ftp'fatalerror || $timeouts > $max_timeouts ){
&msg( $log, "Fatal error talking to site, skipping rest of transfers\n" );
&disconnect();
- return;
+ return -1;
}
next;
}
@@ -3860,14 +3861,14 @@
{
$sigs ++;
if( $sigs > $max_sigs ){
- exit( 0 );
+ exit( 127 );
}
local( $sig ) = @_;
local( $msg ) = "Caught a SIG$sig shutting down";
local( $package, $filename, $line ) = caller;
warn "$package:$filename:$line $msg";
- exit( 0 );
+ exit( 127 );
}
sub trap_signals
----------------------------------------------------------------------------
Cheers,
Marc
--
Microsoft is to software what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ (friendly to non IE browsers)
Finger marc_f@merlins.org for PGP key and other contact information
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#44611; Package mirror.
debian-bugs-dist@lists.debian.org
Subject: Bug#44611: Mirror does not return a failure error code if server goes away
Reply-To: Dirk Eddelbuettel , 44611@bugs.debian.org
Resent-From: Dirk Eddelbuettel
Orignal-Sender: Dirk Eddelbuettel
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Date: Fri, 10 Sep 1999 01:33:02 GMT
Resent-Message-ID:
Resent-Sender: iwj@debian.org
X-Debian-PR-Message: report 44611
X-Debian-PR-Package: mirror
X-Debian-PR-Keywords:
X-Loop: owner@bugs.debian.org
Received: via spool by bugs@bugs.debian.org id=B.9369271108213
(code B ref -1); Fri, 10 Sep 1999 01:33:02 GMT
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Thu, 9 Sep 1999 21:31:23 -0400 (EDT)
To: Marc Merlin ,
44611@bugs.debian.org
Cc: submit@bugs.debian.org
In-Reply-To: <19990908105701.D11608@marc.merlins.org>
References: <19990908105701.D11608@marc.merlins.org>
X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid
Message-ID: <14296.24185.4660.522374@sonny.econ.queensu.ca>
From: Dirk Eddelbuettel
Sender: Dirk Eddelbuettel
Marc,
Could you possibly do the patch against 2.9-7? Ian pointed out that 2.9-4 is
actually based on an older mirror.pl and there are some changes which might
affect your code.
Also, on the return code issue, it is important for Debian to not be too
different from other environments or people will get nasty surprises when
switching Linux / Unix systems. Therefore, I don't think we can change the
return code. But it would be good if you could get Lee to change his
code. Could you talk to him?
Regards, Dirk
--
According to the latest figures, 43% of all statistics are totally worthless.
Acknowledgement sent to Dirk Eddelbuettel <edd@debian.org>:
Extra info received and forwarded to list.
-t
From: owner@bugs.debian.org (Debian Bug Tracking System)
To: Dirk Eddelbuettel
Subject: Bug#44611: Info received (was Bug#44611: Mirror does not return a failure error code if server goes away)
Message-ID:
In-Reply-To: <14296.24185.4660.522374@sonny.econ.queensu.ca>
References: <14296.24185.4660.522374@sonny.econ.queensu.ca>
X-Debian-PR-Message: ack-info-maintonly 44611
Thank you for the additional information you have supplied regarding
this problem report. It has been forwarded to the developer(s) and
to the developers' mailing list to accompany the original report.
If you wish to continue to submit further information on your problem,
please send it to 44611@bugs.debian.org, as before.
Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.
Ian Jackson
(administrator, Debian bugs database)
Received: (at submit) by bugs.debian.org; 10 Sep 1999 01:31:50 +0000
Received: (qmail 8199 invoked from network); 10 Sep 1999 01:31:36 -0000
Received: from ha1.rdc2.on.home.com (HELO mail.rdc2.on.home.com) (24.9.0.15)
by master.debian.org with SMTP; 10 Sep 1999 01:31:36 -0000
Received: from sonny.econ.queensu.ca ([24.112.242.11])
by mail.rdc2.on.home.com (InterMail v4.01.01.07 201-229-111-110)
with ESMTP
id <19990910013122.COXV7242.mail.rdc2.on.home.com@sonny.econ.queensu.ca>;
Thu, 9 Sep 1999 18:31:22 -0700
Received: from edd by sonny.econ.queensu.ca with local (Exim 3.03 #1 (Debian))
id 11PFX9-0000cG-00; Thu, 09 Sep 1999 21:31:23 -0400
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Thu, 9 Sep 1999 21:31:23 -0400 (EDT)
To: Marc Merlin ,
44611@bugs.debian.org
Cc: submit@bugs.debian.org
Subject: Bug#44611: Mirror does not return a failure error code if server goes away
In-Reply-To: <19990908105701.D11608@marc.merlins.org>
References: <19990908105701.D11608@marc.merlins.org>
X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid
Message-ID: <14296.24185.4660.522374@sonny.econ.queensu.ca>
From: Dirk Eddelbuettel
Sender: Dirk Eddelbuettel
Marc,
Could you possibly do the patch against 2.9-7? Ian pointed out that 2.9-4 is
actually based on an older mirror.pl and there are some changes which might
affect your code.
Also, on the return code issue, it is important for Debian to not be too
different from other environments or people will get nasty surprises when
switching Linux / Unix systems. Therefore, I don't think we can change the
return code. But it would be good if you could get Lee to change his
code. Could you talk to him?
Regards, Dirk
--
According to the latest figures, 43% of all statistics are totally worthless.
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#44611; Package mirror.
debian-bugs-dist@lists.debian.org
Subject: Bug#44611: Mirror does not return a failure error code if server goes away
Reply-To: Dirk Eddelbuettel , 44611@bugs.debian.org
Resent-From: Dirk Eddelbuettel
Orignal-Sender: Dirk Eddelbuettel
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Date: Fri, 10 Sep 1999 01:33:12 GMT
Resent-Message-ID:
Resent-Sender: iwj@debian.org
X-Debian-PR-Message: report 44611
X-Debian-PR-Package: mirror
X-Debian-PR-Keywords:
X-Loop: owner@bugs.debian.org
Received: via spool by 44611-bugs@bugs.debian.org id=B44611.9369271108212
(code B ref 44611); Fri, 10 Sep 1999 01:33:12 GMT
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Thu, 9 Sep 1999 21:31:23 -0400 (EDT)
To: Marc Merlin ,
44611@bugs.debian.org
Cc: submit@bugs.debian.org
In-Reply-To: <19990908105701.D11608@marc.merlins.org>
References: <19990908105701.D11608@marc.merlins.org>
X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid
Message-ID: <14296.24185.4660.522374@sonny.econ.queensu.ca>
From: Dirk Eddelbuettel
Sender: Dirk Eddelbuettel
Marc,
Could you possibly do the patch against 2.9-7? Ian pointed out that 2.9-4 is
actually based on an older mirror.pl and there are some changes which might
affect your code.
Also, on the return code issue, it is important for Debian to not be too
different from other environments or people will get nasty surprises when
switching Linux / Unix systems. Therefore, I don't think we can change the
return code. But it would be good if you could get Lee to change his
code. Could you talk to him?
Regards, Dirk
--
According to the latest figures, 43% of all statistics are totally worthless.
Acknowledgement sent to Dirk Eddelbuettel <edd@debian.org>:
Extra info received and forwarded to list.
-t
From: owner@bugs.debian.org (Debian Bug Tracking System)
To: Dirk Eddelbuettel
Subject: Bug#44611: Info received (was Bug#44611: Mirror does not return a failure error code if server goes away)
Message-ID:
In-Reply-To: <14296.24185.4660.522374@sonny.econ.queensu.ca>
References: <14296.24185.4660.522374@sonny.econ.queensu.ca>
X-Debian-PR-Message: ack-info-maintonly 44611
Thank you for the additional information you have supplied regarding
this problem report. It has been forwarded to the developer(s) and
to the developers' mailing list to accompany the original report.
If you wish to continue to submit further information on your problem,
please send it to 44611@bugs.debian.org, as before.
Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.
Ian Jackson
(administrator, Debian bugs database)
Received: (at 44611) by bugs.debian.org; 10 Sep 1999 01:31:50 +0000
Received: (qmail 8199 invoked from network); 10 Sep 1999 01:31:36 -0000
Received: from ha1.rdc2.on.home.com (HELO mail.rdc2.on.home.com) (24.9.0.15)
by master.debian.org with SMTP; 10 Sep 1999 01:31:36 -0000
Received: from sonny.econ.queensu.ca ([24.112.242.11])
by mail.rdc2.on.home.com (InterMail v4.01.01.07 201-229-111-110)
with ESMTP
id <19990910013122.COXV7242.mail.rdc2.on.home.com@sonny.econ.queensu.ca>;
Thu, 9 Sep 1999 18:31:22 -0700
Received: from edd by sonny.econ.queensu.ca with local (Exim 3.03 #1 (Debian))
id 11PFX9-0000cG-00; Thu, 09 Sep 1999 21:31:23 -0400
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Thu, 9 Sep 1999 21:31:23 -0400 (EDT)
To: Marc Merlin ,
44611@bugs.debian.org
Cc: submit@bugs.debian.org
Subject: Bug#44611: Mirror does not return a failure error code if server goes away
In-Reply-To: <19990908105701.D11608@marc.merlins.org>
References: <19990908105701.D11608@marc.merlins.org>
X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid
Message-ID: <14296.24185.4660.522374@sonny.econ.queensu.ca>
From: Dirk Eddelbuettel
Sender: Dirk Eddelbuettel
Marc,
Could you possibly do the patch against 2.9-7? Ian pointed out that 2.9-4 is
actually based on an older mirror.pl and there are some changes which might
affect your code.
Also, on the return code issue, it is important for Debian to not be too
different from other environments or people will get nasty surprises when
switching Linux / Unix systems. Therefore, I don't think we can change the
return code. But it would be good if you could get Lee to change his
code. Could you talk to him?
Regards, Dirk
--
According to the latest figures, 43% of all statistics are totally worthless.
Information forwarded to debian-bugs-dist@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#44611; Package mirror.
debian-bugs-dist@lists.debian.orgDirk Eddelbuettel
Subject: Bug#44611: Mirror does not return a failure error code if server goes away
Reply-To: Marc Merlin , 44611@bugs.debian.org
Resent-From: Marc Merlin
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: Dirk Eddelbuettel
Resent-Date: Tue, 14 Sep 1999 03:33:02 GMT
Resent-Message-ID:
Resent-Sender: owner@bugs.debian.org
X-Debian-PR-Message: report 44611
X-Debian-PR-Package: mirror
X-Debian-PR-Keywords:
X-Loop: owner@bugs.debian.org
Received: via spool by 44611-bugs@bugs.debian.org id=B44611.93727949014429
(code B ref 44611); Tue, 14 Sep 1999 03:33:02 GMT
Date: Mon, 13 Sep 1999 20:24:35 -0700
From: Marc Merlin
To: Dirk Eddelbuettel
Cc: 44611@bugs.debian.org, mjm@icparc.ic.ac.uk, zl@icparc.ic.ac.uk
Message-ID: <19990913202435.A17884@marc.merlins.org>
References: <19990908105701.D11608@marc.merlins.org> <14296.24185.4660.522374@sonny.econ.queensu.ca>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Mailer: Mutt 0.95.6i
In-Reply-To: <14296.24185.4660.522374@sonny.econ.queensu.ca>; from Dirk Eddelbuettel on jeu, sep 09, 1999 at 09:31:23 -0400
X-Sysadmin: BOFH
X-URL: http://marc.merlins.org/
X-Operating-System: Proudly running Linux 2.2.7-1.18/Debian potato
On jeu, sep 09, 1999 at 09:31:23 -0400, Dirk Eddelbuettel wrote:
> Could you possibly do the patch against 2.9-7? Ian pointed out that 2.9-4 is
I upgraded to 2.9-7 and the patch is the same.
> actually based on an older mirror.pl and there are some changes which might
> affect your code.
Looked at it, the changes are completely independant from my patch.
> Also, on the return code issue, it is important for Debian to not be too
> different from other environments or people will get nasty surprises when
> switching Linux / Unix systems. Therefore, I don't think we can change the
> return code. But it would be good if you could get Lee to change his
> code. Could you talk to him?
I've Cced Lee and Zoë n this Email and re-attached the patch.
The only part that one may make comments about is the fact that when a
signal is caught, I made mirror return 127 (instead of 0).
All the other parts of my patch make make mirror exit with a connection
failed return code, as intended by the code.
----------------------------------------------------------------------------
--- mirror.pl Tue Aug 24 19:18:23 1999
+++ mirror Tue Sep 7 15:53:38 1999
@@ -731,7 +731,7 @@
$value{ 'get_patt' } = pop( @get_patt );
$value{ 'local_dir' } = '.';
$value{ 'remote_user' } = 'anonymous';
- $exit_status = &do_mirror();
+ &do_mirror();
}
return;
}
@@ -740,7 +740,7 @@
if( $command_line{ 'interactive' } ){
# No config file to read
$value{ 'package' } = 'interactive';
- $exit_status = &do_mirror();
+ &do_mirror();
return;
}
@@ -760,7 +760,7 @@
# Is this a new package?
if( $value{ 'package' } && $key eq 'package' ){
# mirror the existing package
- $exit_status = &do_mirror();
+ &do_mirror();
# reset
&set_defaults();
@@ -786,7 +786,7 @@
# Mirror the last package in the file
if( $value{ 'package' } ){
- $exit_status = &do_mirror();
+ &do_mirror();
}
}
@@ -994,7 +994,7 @@
$skip_till = $limit_packages = 0;
}
- local( $exit_status ) = $exit_fail_noconnect; # Presume the worse.
+ $exit_status = $exit_fail_noconnect; # Presume the worse.
$timeouts = 0;
# set things from the command line arguments
@@ -1377,9 +1377,10 @@
}
&make_dirs();
- &do_all_transfers();
-
- $exit_status = $exit_ok; # Everything went ok.
+ if (&do_all_transfers() != -1)
+ {
+ $exit_status = $exit_ok; # Everything went ok.
+ }
if( $get_file ){
# I must have finished with the remote information
@@ -2685,7 +2686,7 @@
if( $ftp'fatalerror || $timeouts > $max_timeouts ){
&msg( $log, "Fatal error talking to site, skipping rest of transfers\n" );
&disconnect();
- return;
+ return -1;
}
next;
}
@@ -3860,14 +3861,14 @@
{
$sigs ++;
if( $sigs > $max_sigs ){
- exit( 0 );
+ exit( 127 );
}
local( $sig ) = @_;
local( $msg ) = "Caught a SIG$sig shutting down";
local( $package, $filename, $line ) = caller;
warn "$package:$filename:$line $msg";
- exit( 0 );
+ exit( 127 );
}
sub trap_signals
----------------------------------------------------------------------------
Cheers,
Marc
--
Microsoft is to software what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ (friendly to non IE browsers)
Finger marc_f@merlins.org for PGP key and other contact information
Acknowledgement sent to Marc Merlin <marcsoft@merlins.org>:
Extra info received and forwarded to list. Copy sent to Dirk Eddelbuettel <edd@debian.org>.
-t
From: owner@bugs.debian.org (Debian Bug Tracking System)
To: Marc Merlin
Subject: Bug#44611: Info received (was Bug#44611: Mirror does not return a failure error code if server goes away)
Message-ID:
In-Reply-To: <19990913202435.A17884@marc.merlins.org>
References: <19990913202435.A17884@marc.merlins.org>
X-Debian-PR-Message: ack-info-maintonly 44611
Thank you for the additional information you have supplied regarding
this problem report. It has been forwarded to the developer(s) and
to the developers mailing list to accompany the original report.
Your message has been sent to the package maintainer(s):
Dirk Eddelbuettel
If you wish to continue to submit further information on your problem,
please send it to 44611@bugs.debian.org, as before.
Please do not reply to the address at the top of this message,
unless you wish to report a problem with the Bug-tracking system.
Debian Bug Tracking System
(administrator, Debian Bugs database)
Received: (at 44611) by bugs.debian.org; 14 Sep 1999 03:24:49 +0000
Received: (qmail 14418 invoked from network); 14 Sep 1999 03:24:49 -0000
Received: from magic.magic.metawire.com (HELO magic.merlins.org) (root@204.80.113.97)
by master.debian.org with SMTP; 14 Sep 1999 03:24:49 -0000
Received: (from merlin@localhost)
by magic.merlins.org (8.9.3/8.9.3) id UAA18978;
Mon, 13 Sep 1999 20:24:35 -0700
Date: Mon, 13 Sep 1999 20:24:35 -0700
From: Marc Merlin
To: Dirk Eddelbuettel
Cc: 44611@bugs.debian.org, mjm@icparc.ic.ac.uk, zl@icparc.ic.ac.uk
Subject: Re: Bug#44611: Mirror does not return a failure error code if server goes away
Message-ID: <19990913202435.A17884@marc.merlins.org>
References: <19990908105701.D11608@marc.merlins.org> <14296.24185.4660.522374@sonny.econ.queensu.ca>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Mailer: Mutt 0.95.6i
In-Reply-To: <14296.24185.4660.522374@sonny.econ.queensu.ca>; from Dirk Eddelbuettel on jeu, sep 09, 1999 at 09:31:23 -0400
X-Sysadmin: BOFH
X-URL: http://marc.merlins.org/
X-Operating-System: Proudly running Linux 2.2.7-1.18/Debian potato
On jeu, sep 09, 1999 at 09:31:23 -0400, Dirk Eddelbuettel wrote:
> Could you possibly do the patch against 2.9-7? Ian pointed out that 2.9-4 is
I upgraded to 2.9-7 and the patch is the same.
> actually based on an older mirror.pl and there are some changes which might
> affect your code.
Looked at it, the changes are completely independant from my patch.
> Also, on the return code issue, it is important for Debian to not be too
> different from other environments or people will get nasty surprises when
> switching Linux / Unix systems. Therefore, I don't think we can change the
> return code. But it would be good if you could get Lee to change his
> code. Could you talk to him?
I've Cced Lee and Zoë n this Email and re-attached the patch.
The only part that one may make comments about is the fact that when a
signal is caught, I made mirror return 127 (instead of 0).
All the other parts of my patch make make mirror exit with a connection
failed return code, as intended by the code.
----------------------------------------------------------------------------
--- mirror.pl Tue Aug 24 19:18:23 1999
+++ mirror Tue Sep 7 15:53:38 1999
@@ -731,7 +731,7 @@
$value{ 'get_patt' } = pop( @get_patt );
$value{ 'local_dir' } = '.';
$value{ 'remote_user' } = 'anonymous';
- $exit_status = &do_mirror();
+ &do_mirror();
}
return;
}
@@ -740,7 +740,7 @@
if( $command_line{ 'interactive' } ){
# No config file to read
$value{ 'package' } = 'interactive';
- $exit_status = &do_mirror();
+ &do_mirror();
return;
}
@@ -760,7 +760,7 @@
# Is this a new package?
if( $value{ 'package' } && $key eq 'package' ){
# mirror the existing package
- $exit_status = &do_mirror();
+ &do_mirror();
# reset
&set_defaults();
@@ -786,7 +786,7 @@
# Mirror the last package in the file
if( $value{ 'package' } ){
- $exit_status = &do_mirror();
+ &do_mirror();
}
}
@@ -994,7 +994,7 @@
$skip_till = $limit_packages = 0;
}
- local( $exit_status ) = $exit_fail_noconnect; # Presume the worse.
+ $exit_status = $exit_fail_noconnect; # Presume the worse.
$timeouts = 0;
# set things from the command line arguments
@@ -1377,9 +1377,10 @@
}
&make_dirs();
- &do_all_transfers();
-
- $exit_status = $exit_ok; # Everything went ok.
+ if (&do_all_transfers() != -1)
+ {
+ $exit_status = $exit_ok; # Everything went ok.
+ }
if( $get_file ){
# I must have finished with the remote information
@@ -2685,7 +2686,7 @@
if( $ftp'fatalerror || $timeouts > $max_timeouts ){
&msg( $log, "Fatal error talking to site, skipping rest of transfers\n" );
&disconnect();
- return;
+ return -1;
}
next;
}
@@ -3860,14 +3861,14 @@
{
$sigs ++;
if( $sigs > $max_sigs ){
- exit( 0 );
+ exit( 127 );
}
local( $sig ) = @_;
local( $msg ) = "Caught a SIG$sig shutting down";
local( $package, $filename, $line ) = caller;
warn "$package:$filename:$line $msg";
- exit( 0 );
+ exit( 127 );
}
sub trap_signals
----------------------------------------------------------------------------
Cheers,
Marc
--
Microsoft is to software what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ (friendly to non IE browsers)
Finger marc_f@merlins.org for PGP key and other contact information
Noted your statement that Bug has been forwarded to lmjm@icparc.ic.ac.uk.
Request was from Dirk Eddelbuettel <edd@debian.org>
to control@bugs.debian.org.
Received: (at control) by bugs.debian.org; 22 Sep 1999 01:36:45 +0000
Received: (qmail 24301 invoked from network); 22 Sep 1999 01:36:32 -0000
Received: from ha1.rdc3.on.home.com (HELO mail.rdc3.on.home.com) (24.2.9.68)
by master.debian.org with SMTP; 22 Sep 1999 01:36:32 -0000
Received: from cr115551-a.yec1.on.wave.home.com ([24.112.242.11])
by mail.rdc3.on.home.com (InterMail v4.01.01.02 201-229-111-106)
with ESMTP
id <19990922013451.LQZG7833.mail.rdc3.on.home.com@cr115551-a.yec1.on.wave.home.com>;
Tue, 21 Sep 1999 18:34:51 -0700
Received: from edd by cr115551-a.yec1.on.wave.home.com with local (Exim 3.03 #1 (Debian))
id 11TbKf-00009V-00; Tue, 21 Sep 1999 21:36:29 -0400
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Tue, 21 Sep 1999 21:36:29 -0400 (EDT)
To: control@bugs.debian.org, Marc Merlin
Subject: setting two mirror bugs as forwarded
X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid
Message-ID: <14312.12804.791152.827473@cr115551-a.yec1.on.wave.home.com>
From: Dirk Eddelbuettel
Sender: Dirk Eddelbuettel
forwarded 44020 lmjm@icparc.ic.ac.uk
forwarded 44611 lmjm@icparc.ic.ac.uk
quit
--
According to the latest figures, 43% of all statistics are totally worthless.
Severity set to `wishlist'.
Request was from Ian Maclaine-cross <iml@ilm.mech.unsw.edu.au>
to control@bugs.debian.org.
Received: (at control) by bugs.debian.org; 22 Jan 2001 05:08:36 +0000
From iml@ilm.mech.unsw.edu.au Sun Jan 21 23:08:36 2001
Return-path:
Received: from ilm.mech.unsw.edu.au [::ffff:129.94.171.100]
by master.debian.org with esmtp (Exim 3.12 1 (Debian))
id 14KZDY-0002Ra-00; Sun, 21 Jan 2001 23:08:36 -0600
Received: from iml by ilm.mech.unsw.edu.au with local (Exim 3.12 #1 (Debian))
id 14KZDV-00019U-00
for ; Mon, 22 Jan 2001 16:08:33 +1100
Date: Mon, 22 Jan 2001 16:08:33 +1100
To: control@bugs.debian.org
Subject: Mirror bug severity (again)
Message-ID: <20010122160833.A4412@ilm.mech.unsw.edu.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
From: Ian Maclaine-cross
Delivered-To: control@bugs.debian.org
severity #44020 wishlist
severity #44611 wishlist
--
Regards,
Ian Maclaine-cross (iml@debian.org)