Merge lp://staging/~mterry/deja-dup/tempdir-archive-dir into lp://staging/deja-dup/26
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 1445 | ||||
Proposed branch: | lp://staging/~mterry/deja-dup/tempdir-archive-dir | ||||
Merge into: | lp://staging/deja-dup/26 | ||||
Prerequisite: | lp://staging/~mterry/deja-dup/more-idle | ||||
Diff against target: |
104 lines (+19/-26) 4 files modified
tests/mock/duplicity (+2/-1) tests/runner.vala (+1/-2) tools/duplicity/DuplicityInstance.vala (+4/-6) tools/duplicity/DuplicityJob.vala (+12/-17) |
||||
To merge this branch: | bzr merge lp://staging/~mterry/deja-dup/tempdir-archive-dir | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Bruce Park (community) | Needs Fixing | ||
Review via email: mp+155323@code.staging.launchpad.net |
This proposal supersedes a proposal from 2013-03-25.
Description of the change
A little while back, for 25.5, I added code to tell duplicity to use a tempdir that is on the same partition as the source files, so that a user with /tmp as a tmpfs partition wouldn't fill it up.
However, there is one code path where we end up using /tmp anyway, that I didn't notice. If we are testing a restore in "nag mode", which is where we don't use any cached information (we re-download all the metadata and ask for the password again, hence the "nag"), we were making a call to g_dir_make_tmp. This uses /tmp, and we were filling /tmp up with our downloaded metadata.
So the solution is to use g_mkdtemp, which lets us specify a tempdir, and we'll re-use the one we create for passing to duplicity.
There's a bit of cleanup in the tests/ directory to match this new usage and to better test it.
So, the diff looks quite nice, but 'make check' failed with this error:
/scripts/ instance- error: OK robru/Applicati ons/deja- dup/tempdir- archive- dir/tests/ .libs/lt- runner: 4911): WARNING **: runner.vala:292: Error string didn't match; expected (null), got Failed with an unknown error. robru/Applicati ons/deja- dup/tempdir- archive- dir/tests'
/scripts/mkdir: OK
/scripts/nag:
** (/home/
/bin/bash: line 1: 4911 Trace/breakpoint trap (core dumped) top_builddir=.. srcdir=. dbus-launch ./runner $test
make[1]: *** [check] Error 133
make[1]: Leaving directory `/home/
make: *** [check-recursive] Error 1