Package: dput
Version: 0.9.2.32
Severity: wishlist
Hi,
Occasionally, an upload fails midway through a very large set of
packages; e.g. boost has 29 packages. Currently, I have to
"dcut" all the files uploaded before re-trying because dput
errors when a file cannot be created.
How about a --resume option to simply ignore such errors?
I've just tested the following patch to verify that the strategy
works. It needs to be improved such that resume_failed is set by a
command line switch.
diff -u -r dput-0.9.2.32/ftp.py dput-0.9.2.32-mod/ftp.py
--- dput-0.9.2.32/ftp.py 2008-05-01 13:56:34.000000000 -0500
+++ dput-0.9.2.32-mod/ftp.py 2008-05-19 12:58:36.000000000 -0500
@@ -2,6 +2,7 @@
# Upload the files via ftp. (Could need a bit more error-checking.)
def upload(fqdn, login, incoming, files_to_upload, debug, ftp_mode,
progress=0, port=21):
+ resume_failed = 1
try:
ftp_connection = ftplib.FTP()
ftp_connection.connect(fqdn, port)
@@ -61,6 +62,9 @@
except ftplib.all_errors, e:
print "\nError '%s' during ftp transfer of
%s"%(str(e),package_name)
if isinstance(e,ftplib.Error) and e.args and e.args[0][:3]=='553':
+ if (resume_failed):
+ print "Leaving existing file on server and continuing."
+ continue
print """Note: This problem might be caused by files already
existent on the server.
For the official Debian upload queues, the dcut(1) utility can be used
to remove stale files from unsuccessful uploads."""
In the documentation, you might note that it is prudent to dcut the
last file of the failed upload since it might be corrupt. But all
previous files should be OK.
Cheers,
-Steve
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages dput depends on:
ii gnupg 1.4.6-3 GNU privacy guard - a free PGP rep
ii python 2.5.2-1 An interactive high-level object-o
dput recommends no packages.
-- debconf information:
* dput/config-file-format:
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]