Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 347303 - app-backup/duplicity-0.6.11 crashes with KeyError: 'RSYNC_RSH'
Summary: app-backup/duplicity-0.6.11 crashes with KeyError: 'RSYNC_RSH'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Marcelo Goes (RETIRED)
URL: https://bugs.launchpad.net/duplicity/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-30 16:36 UTC by Stephan Friedrichs
Modified: 2011-04-09 16:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cave info duplicity (duplicity,15.24 KB, text/plain)
2010-12-09 19:55 UTC, Stephan Friedrichs
Details
duplicity buildlog (log,32.88 KB, text/plain)
2010-12-15 11:19 UTC, Stephan Friedrichs
Details
rsyncbackend-environ.patch (rsyncbackend-environ.patch,641 bytes, patch)
2010-12-15 16:45 UTC, Christian Ruppert (idl0r)
Details | Diff
slightly modified patch (rsyncbackend-environ.patch,555 bytes, text/plain)
2010-12-16 15:50 UTC, Stephan Friedrichs
Details
Ebuild used to patch the sources with the patch posted a minute ago (duplicity-0.6.11.ebuild,919 bytes, text/plain)
2010-12-16 15:51 UTC, Stephan Friedrichs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Friedrichs 2010-11-30 16:36:15 UTC
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1245, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1238, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1124, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 927, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 820, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 153, in get_backend
    return _backends[pu.scheme](pu)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/rsyncbackend.py", line 52, in __init__
    del os.environ['RSYNC_RSH']
  File "/usr/lib64/python2.7/os.py", line 496, in __delitem__
    del self.data[key]
KeyError: 'RSYNC_RSH'

This error is not reproducable with earlier versions of duplicity.

Reproducible: Always

Steps to Reproduce:
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-09 19:11:40 UTC
Please post your `emerge --info' in a comment.
Comment 2 Stephan Friedrichs 2010-12-09 19:55:09 UTC
Created attachment 256774 [details]
cave info duplicity
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-14 23:23:20 UTC
I see you have trouble reading English.

OK, THANKS. NOW >ATTACH< THE ENTIRE BUILD LOG AS A >FILE<. DO NOT PASTE IT IN A COMMENT AT ALL.

Get it?
Comment 4 Stephan Friedrichs 2010-12-15 11:18:56 UTC
(comment #1)
> Please post your `emerge --info' in a comment.

(comment #3)
> I see you have trouble reading English.
> 
> OK, THANKS. NOW >ATTACH< THE ENTIRE BUILD LOG AS A >FILE<. DO NOT PASTE IT IN A
> COMMENT AT ALL.
> 
> Get it?

Please watch your language.

If you would have said "buildlog", I would have attached it. But you said "emerge --info", so I attached (the paludis-equivalent of) that. I didn't *paste* anything but the *output* of duplicity which is reasonably short.

Attachment of buildlog is following.
Comment 5 Stephan Friedrichs 2010-12-15 11:19:32 UTC
Created attachment 257216 [details]
duplicity buildlog
Comment 6 Christian Ruppert (idl0r) gentoo-dev 2010-12-15 16:45:23 UTC
Created attachment 257233 [details, diff]
rsyncbackend-environ.patch

Does my patch solve your issue? I just hit it too.. But it's more a upstream bug.
Comment 7 Stephan Friedrichs 2010-12-16 15:49:52 UTC
(In reply to comment #6)
> Created an attachment (id=257233) [details]
> rsyncbackend-environ.patch
> 
> Does my patch solve your issue? I just hit it too.. But it's more a upstream
> bug.
> 

No it doesn't. I had to correct it (there's a colon missing after the if-statement), but even that produces the same exception (originating in the line with the new if-statement):

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1245, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1238, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1124, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 927, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 820, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 153, in get_backend
    return _backends[pu.scheme](pu)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/rsyncbackend.py", line 52, in __init__
    if os.environ['RSYNC_RSH']:
  File "/usr/lib64/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'RSYNC_RSH'

As I said, I'm not sure if I did everything right, so I'll attach the ebuild I used and the modified patch
Comment 8 Stephan Friedrichs 2010-12-16 15:50:59 UTC
Created attachment 257327 [details]
slightly modified patch

there was a colon missing in the last patch
Comment 9 Stephan Friedrichs 2010-12-16 15:51:37 UTC
Created attachment 257328 [details]
Ebuild used to patch the sources with the patch posted a minute ago
Comment 10 Stephan Friedrichs 2010-12-16 15:58:11 UTC
PS: The file /usr/lib64/python2.7/site-packages/duplicity/backends/rsyncbackend.py is indeed modified, so the patch seems to have worked.
Comment 11 Christian Ruppert (idl0r) gentoo-dev 2010-12-16 16:57:04 UTC
Yeah, sorry for the missing colon.
Make sure the rsyncbackend.pyc and .pyo are *not* older than the rsyncbackend.py.
Comment 12 Stephan Friedrichs 2010-12-16 18:24:34 UTC
No, they all have the same age

% ls -l /usr/lib64/python2.7/site-packages/duplicity/backends
...
-rw-r--r-- 1 root root 6.4K Dec 16 16:43 rsyncbackend.py
-rw-r--r-- 1 root root 5.6K Dec 16 16:43 rsyncbackend.pyc
-rw-r--r-- 1 root root 5.6K Dec 16 16:43 rsyncbackend.pyo
...
Comment 13 Christian Ruppert (idl0r) gentoo-dev 2010-12-16 19:06:56 UTC
There is also a upstream bug. The patch is slightly different, try it instead please.
https://bugs.launchpad.net/duplicity/+bug/681980
Comment 14 Stephan Friedrichs 2010-12-17 13:15:33 UTC
(In reply to comment #13)
> There is also a upstream bug. The patch is slightly different, try it instead
> please.
> https://bugs.launchpad.net/duplicity/+bug/681980
> 

It works!
Comment 15 Stephan Friedrichs 2011-01-05 22:07:20 UTC
What's the status, does the patch work for you, too? Can you release a patched duplicity-0.6.11-r1 in portage?
Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2011-04-09 16:50:32 UTC
New in v0.6.12 (2011/03/08)
----------------------------
Bugs closed in this release:
681980     Duplicity 0.6.11 aborts if RSYNC_RSH not set

0.6.13 is in the tree.