[Bug 1216921] Please test proposed package

Stéphane Graber stgraber at stgraber.org
Tue Nov 5 15:20:22 UTC 2013


Hello Matthias, or anyone else affected,

Accepted duplicity into raring-proposed. The package will build now and
be available at
http://launchpad.net/ubuntu/+source/duplicity/0.6.21-0ubuntu1.2 in a few
hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed.  Your feedback will aid us getting this update
out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, and change the tag
from verification-needed to verification-done. If it does not fix the
bug for you, please add a comment stating that, and change the tag to
verification-failed.  In either case, details of your testing will help
us make a better decision.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1216921

Title:
  util.ignore_missing() does not work

Status in Duplicity - Bandwidth Efficient Encrypted Backup:
  Fix Committed
Status in “duplicity” package in Ubuntu:
  Fix Released
Status in “duplicity” source package in Precise:
  Fix Committed
Status in “duplicity” source package in Quantal:
  Fix Committed
Status in “duplicity” source package in Raring:
  Fix Committed

Bug description:
  SRU justification :

  Without this fix, there is a potential for crash during execution of
  duplicity

  Impact :

  Renders duplicity potentially unusable dues to spurious crashes

  Fix :

  Backport upstream fix for this problem merged in 
  https://code.launchpad.net/~mterry/duplicity/ignore-missing

  Test Case :

  A session must be run within the python debugger to systematically
  reproduce the context.

  1) Run a duplicity session as outlined in comment #8 inside the debugger
  2) break at duplicity/path:568 instead of 567
  3) When the program breaks, manually remove the file that ends in "...manifest.gpg"
  4) continue execution

  Without the fix, duplicity will crash with the outlined backtrace.
  With the fix, duplicity will terminate normally.

  Regression :

  Minimal as the modification changes exception handling only for a
  function only used twice to delete files/directories (path.py &
  tempdir.py)

  Description of the problem :

  Duplicity can potentially crash while attempting to delete a file that
  no longer exists.

  Original description

  duplicity version: 0.6.18-0ubuntu3
  python version: 2.7.3
  Distro: ubuntu precise 12.04
  target file system: ftp

  I happen to encounter failed backups with tracebacks like this:

  Traceback (most recent call last):
    File "/usr/bin/duplicity", line 1403, in <module>
       with_tempdir(main)
    File "/usr/bin/duplicity", line 1396, in with_tempdir
       fn()
     File "/usr/bin/duplicity", line 1366, in main
       full_backup(col_stats)
     File "/usr/bin/duplicity", line 504, in full_backup
       sig_outfp.to_remote()
     File "/usr/lib/python2.7/dist-packages/duplicity/dup_temp.py", line 184, in to_remote
       globals.backend.move(tgt) #@UndefinedVariable
     File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 364, in move
       source_path.delete()
     File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 567, in delete
       util.ignore_missing(os.unlink, self.name)
     File "/usr/lib/python2.7/dist-packages/duplicity/util.py", line 116, in ignore_missing
       fn(filename)
   OSError: [Errno 2] No such file or directory: '/BACKUP/.duplycache/duply_foo/duplicity-full-signatures.20130825T140002Z.sigtar.gpg'

  Now running test code like

  #!/usr/bin/env python
  #
  # Do what util.ignore_missing(os.unlink, self.name) tries to do and
  # fails to achieve

  import os
  import sys
  import errno

  if __name__ == "__main__":
          try:
                  os.unlink("/tmp/doesnotexist")
          except Exception:
                  # "type" is a reserved keyword, replaced with "mytype"
                  mytype, value, tb = sys.exc_info()
                  print "-" * 78
                  print "mytype: ", mytype
                  print "value: ", value
                  print "value[0]:", value[0]
                  print "errno.ENOENT: ", errno.ENOENT
                  print "isinstance(mytype, OSError): ", isinstance(mytype, OSError)
                  print "-" * 78
                  if isinstance(mytype, OSError) and value[0] == errno.ENOENT:
                          print "Gotcha!"
                          pass
                  print "Ooops, missed it ..."
                  raise

  will always raise the exception and not ignore it, because
  isinstance(mytype, OSError) is always False.

  What I expect ignore_missing to look like is:

  def ignore_missing(fn, filename):
      """
      Execute fn on filename.  Ignore ENOENT errors, otherwise raise exception.

      @param fn: callable
      @param filename: string
      """
      try:
          fn(filename)
      except OSError, ex:
          if ex.errno == errno.ENOENT:
              pass
          else:
              raise
      else:
          raise

To manage notifications about this bug go to:
https://bugs.launchpad.net/duplicity/+bug/1216921/+subscriptions



More information about the Ubuntu-sponsors mailing list