Package: dput
Version: 0.9.2.28
Severity: wishlist
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi,

i've historically had issues with ftp-master uploading for inexplicable
reasons (probably NAT related, i don't know), so i typically do my
uploads via gluck/~tfheen/delayed in the 0 day queue.  as such it would
be nice to not have to specify a -e 0 or similar every time i run dput.

attached is a patch that will let one specify in the host or DEFAULT
sections of a dput.cf file a value for delayed (which is still overridden
by the cmdline value).


        sean

- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dput depends on:
ii  gnupg                         1.4.6-2    GNU privacy guard - a free PGP rep
ii  python                        2.4.4-6    An interactive high-level object-o

dput recommends no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG/WatynjLPm522B0RAtZlAJ9sH2OBOLMuLiT0lo7IhJO+KXGVgQCeMmJI
Cmw5L+4DXCp69+ZqLb499FU=
=KpX9
-----END PGP SIGNATURE-----
--- /usr/bin/dput       2007-07-15 15:06:45.000000000 +0200
+++ /usr/bin/dput.new   2007-09-28 22:34:53.000000000 +0200
@@ -103,6 +103,7 @@
     config.set('DEFAULT', 'ssh_config_options', '')
     config.set('DEFAULT', 'passive_ftp', '1')
     config.set('DEFAULT', 'progress_indicator', '0')
+    config.set('DEFAULT', 'delayed', '')
 
     if extra_config:
        config_files = (extra_config,)
@@ -837,6 +838,12 @@
             fqdn = config.get(host, 'fqdn')
         incoming = config.get(host, 'incoming')
 
+        # if delay_upload wasn't passed via -e/--delayed
+        if not delay_upload:
+            delay_upload = config.get(host, 'delayed')
+            if not delay_upload:
+                delay_upload = config.get('DEFAULT', 'delayed')
+
         if delay_upload:
             if int(delay_upload) == 0:
                 print "Warning: You're trying to upload to DELAYED/0-day."

Reply via email to