Merge lp:~mwilck/duplicity/0.7-series into lp:duplicity/0.7-series

Proposed by Martin Wilck on 2016-07-29
Status: Merged
Merge reported by: Kenneth Loafman
Merged at revision: not available
Proposed branch: lp:~mwilck/duplicity/0.7-series
Merge into: lp:duplicity/0.7-series
Diff against target: 51 lines (+26/-1) (has conflicts)
1 file modified
testing/functional/__init__.py (+26/-1)
Text conflict in testing/functional/__init__.py
To merge this branch: bzr merge lp:~mwilck/duplicity/0.7-series
Reviewer Review Type Date Requested Status
Kenneth Loafman 2016-07-29 Approve on 2016-07-31
Review via email: mp+301492@code.launchpad.net

Description of the change

Fix the regression on Trusty.

To post a comment you must log in.
Kenneth Loafman (kenneth-loafman) wrote :

You have a conflict in the merge, see above. You need to start with the latest source.

review: Needs Fixing
Martin Wilck (mwilck) wrote :

Sorry. I'll be out of office for a week, will look into this later.

Martin Wilck (mwilck) wrote :

But it's just a whitespace issue - would it be asked too much that you fix it quickly?

Kenneth Loafman (kenneth-loafman) wrote :

I fixed the patch and applied it to 0.7 and 0.8 both.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'testing/functional/__init__.py'
2--- testing/functional/__init__.py 2016-07-28 15:34:42 +0000
3+++ testing/functional/__init__.py 2016-07-29 13:50:55 +0000
4@@ -39,6 +39,24 @@
5
6 class FunctionalTestCase(DuplicityTestCase):
7
8+ _setsid_w = None
9+
10+ @classmethod
11+ def _check_setsid(cls):
12+ if cls._setsid_w is not None:
13+ return
14+ if platform.platform().startswith('Linux'):
15+ # setsid behavior differs between distributions.
16+ # If setsid supports -w ("wait"), use it.
17+ import subprocess
18+ try:
19+ with open("/dev/null", "w") as sink:
20+ subprocess.check_call(["setsid", "-w", "ls"], stdout=sink, stderr=sink)
21+ except subprocess.CalledProcessError:
22+ cls._setsid_w = False
23+ else:
24+ cls._setsid_w = True
25+
26 def setUp(self):
27 super(FunctionalTestCase, self).setUp()
28
29@@ -55,6 +73,7 @@
30 if bl:
31 backend_inst.delete(backend_inst.list())
32 backend_inst.close()
33+ self._check_setsid()
34
35 def run_duplicity(self, options=[], current_time=None, fail=None,
36 passphrase_input=[]):
37@@ -65,7 +84,13 @@
38 # this way we force a failure if duplicity tries to read from the
39 # console unexpectedly (like for gpg password or such).
40 if platform.platform().startswith('Linux'):
41- cmd_list = ['setsid']
42+<<<<<<< TREE
43+ cmd_list = ['setsid']
44+=======
45+ cmd_list = ['setsid']
46+ if self._setsid_w:
47+ cmd_list.extend(["-w"])
48+>>>>>>> MERGE-SOURCE
49 else:
50 cmd_list = []
51 cmd_list.extend(["duplicity"])

Subscribers

People subscribed via source and target branches