Merge lp://staging/~mterry/deja-dup/tempdir-archive-dir into lp://staging/deja-dup/26

Proposed by Michael Terry
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
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.

To post a comment you must log in.
1446. By Michael Terry

use duplicity-XXXXXX instead of deja-dup-XXXXXX so that we will clean the folder automatically

Revision history for this message
Robert Bruce Park (robru) wrote :

So, the diff looks quite nice, but 'make check' failed with this error:

/scripts/instance-error: OK
/scripts/mkdir: OK
/scripts/nag:
** (/home/robru/Applications/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.
/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/robru/Applications/deja-dup/tempdir-archive-dir/tests'
make: *** [check-recursive] Error 1

review: Needs Fixing
Revision history for this message
Michael Terry (mterry) wrote :

Ah, whoops. That was because of my second commit. I forgot to update the test to account for the change. Fixing that is just test-side and does not change the logic of the merge, so I'll just go ahead and merge.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches