~ubuntu-branches/ubuntu/maverick/dput/maverick

« back to all changes in this revision

Viewing changes to dput

  • Committer: Bazaar Package Importer
  • Author(s): Cody A.W. Somerville
  • Date: 2008-12-22 17:16:38 UTC
  • mfrom: (1.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20081222171638-bp3m7gyeejq114ju
Tags: 0.9.2.36ubuntu1
* Merge from debian unstable, remaining changes: (LP: #310754)
  + sftp.py: Support for uploads via sftp transport
  + dput.cf:
    - set 'default_main_host = ubuntu'
    - set 'progress_indicator = 2'
  + dput:
    - Recognize 0ubuntu1 as a debian version that requires
      orig.tar.gz to be included in the upload.
  + debian/control: Added suggests on bzr (as we use the bzrlib.transport)
  + debian/rules: Updated to install sftp.py
  + dput: 
    - Added ability to pass an argument to the host configuration by placing
       a colon after the hostname. The variable with the same name of the host
       will be replaced with the string following the colon. (LP: #196797)
    - Properly check to see if config stanza exists for host. (LP: #196786)
  + dput.cf: Updated ppa stanza to make use of argument support.
  + dput.cf.5: Updated to note support for sftp transport and host args
  + dput.1: Updated to document host argument feature and sftp support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
sys.path.insert(0,'/usr/share/dput/helper')
27
27
import dputhelper
28
28
 
29
 
dput_version = "dput 0.9.2.35"
 
29
dput_version = "dput 0.9.2.36"
30
30
 
31
31
config = None
32
32
upload_methods = {}
375
375
# Write a logfile of the upload and call it .upload
376
376
def create_upload_file(package, host, path, files_to_upload, debug):
377
377
    base = os.path.splitext(package)[0] # only need first part
378
 
    logfile_name = os.path.join(path, base + '.upload')
 
378
    logfile_name = os.path.join(path, base + '.' + host + '.upload')
379
379
    if config.get(host, 'method') == 'local':
380
380
        fqdn = 'localhost'
381
381
    else:
393
393
 
394
394
    for file in files_to_upload:
395
395
        entry_for_logfile = 'Successfully uploaded ' + os.path.basename(file) + \
396
 
            ' to ' + fqdn + '.\n'
 
396
            ' to ' + host + ' of ' + fqdn + '.\n'
397
397
        logfile_fd.write(entry_for_logfile)
398
398
    logfile_fd.close()
399
399
        
458
458
                                                     'default_host_main')
459
459
      return config.get('DEFAULT', 'default_host_main')
460
460
    else:
461
 
      print "Uploading package to host ftp-master.debian.org"
 
461
      print "Uploading package to host ftp.upload.debian.org"
462
462
      return "ftp-master"
463
463
 
464
464
# Run dinstall in test-mode and present the output to the user so that
551
551
def check_upload_logfile(changes_file, host, check_only,
552
552
                         call_lintian, force_upload, debug):
553
553
    uploaded = 0
554
 
    upload_logfile = changes_file[:-8] + '.upload'
 
554
    upload_logfile = changes_file[:-8] + '.' + host + '.upload'
555
555
    if not check_only and not force_upload:
556
556
        if not os.path.exists(upload_logfile):
557
557
            return
568
568
            if line.find(fqdn) != -1:
569
569
                uploaded = 1
570
570
        if uploaded:
571
 
            print "Already uploaded to %s" % fqdn
 
571
            print "Already uploaded to %s on %s" % (host, fqdn)
572
572
            print "Doing nothing for %s" % changes_file
573
573
            sys.exit(0)
574
574