lib/repo: Auto-recreate repo/tmp if it's deleted

We can accumulate a lot of space there; let's be nice to people who delete the
whole directory.

Closes: https://github.com/ostreedev/ostree/issues/1018

Closes: #1020
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-07-19 15:01:19 +00:00
1 parent c740b7f6d2
commit 779f125cbe
2 files changed
+23 -1

No files matched your search

+9 -1
View File
@@ -19,7 +19,7 @@
set -euo pipefail
echo "1..$((69 + ${extra_basic_tests:-0}))"
echo "1..$((70 + ${extra_basic_tests:-0}))"
$CMD_PREFIX ostree --version > version.yaml
python -c 'import yaml; yaml.safe_load(open("version.yaml"))'
@@ -112,6 +112,14 @@ ostree_repo_init test-repo --mode=bare-user
rm test-repo -rf
echo "ok repo-init on existing repo"
rm test-repo -rf
ostree_repo_init test-repo --mode=bare-user
${CMD_PREFIX} ostree --repo=test-repo refs
rm -rf test-repo/tmp
${CMD_PREFIX} ostree --repo=test-repo refs
assert_has_dir test-repo/tmp
echo "ok autocreate tmp"
rm checkout-test2 -rf
$OSTREE checkout test2 checkout-test2
cd checkout-test2